String buf#924
Conversation
r6915ee
left a comment
There was a problem hiding this comment.
I'm noticing that the way the buffer is modified is done using large sections of code that can consist of up to ten lines using just the add method. I'd personally recommend iterating through every modification and applying it that way.
var buf:StringBuf = new StringBuf();
for (i in ["prefix", data, "suffix"])
buf.add(i);
Actually, in the |
|
I ended up writing a macro for this. It might make the code look a bit bloated, but it's definitely better than the previous approach. Of course, if there's a better way, feel free to let me know. |
|
Use a macro to automatically convert |
|
Why is there a macro? |
Since I wasn't sure how to use |
Use
StringBufto reduce memory overhead from string concatenation.