The next question is about stan229 and Bill Lizard's request.
It's really interesting how much the performance differs from browser to browser. For me, the question was which concatenation method to choose , and I got the answer I wanted. But here are more test results:
chrome 10.0.648.204: str: 748 sb : 849 firefox 3.6.16: str: 1681 sb : 1861 ie 8: str: 2484 sb : 4094 opera 11.10 str: 802 sb : 792
So, I got the answer: + operator gives better performance
My next question is what gives the best performance:
int i=0; // this String result = String.valueOf(i); // or this String result = i + "";
will post this as soon as I do the test, or if you have an answer please write
source share