Things like the code below is super slow:
var str:String = ""
for (var i:Number = 0 ; i<1000000000000000000 ; ++i) {
str += "someLongLongLongLongLongLongLongLongLongString";
}
There is StringBuilder
in Java but seems there is no equivalent for AS.
So, how do you guys handle large strings concatenation?
Update:
Thanks for everyone's answer!
I've just coded my own testing program. Using +=
is already the fastest... What is slow is whan put it on a TextArea...
I've up voted for most of you as the advices make sense :) although my test result show that seems my question is somewhat problematic since I ask for something better then what is already the best :P