I just tried StringBuilder and StringBuffer, they seem to perform the same, I doubt that in the JS environment there is a reason for a difference between the 2 since JS is single threaded. The huge difference between StringBuffer/Builder and a String concatenation is that the usual String "+" performs 2 to 4 times faster in IE6 and FF3 than StringBuffer/Builder in my simple case. So I will stick to the simple " " + some String + " ".
Thanks anyway, Fred On Tue, Jan 27, 2009 at 16:06, Adam T <[email protected]> wrote: > > Consider using StringBuilder: > http://code.google.com/p/google-web-toolkit/issues/detail?id=945&q=string%20concat > > //Adam > > On 27 Jan, 06:34, Fred Janon <[email protected]> wrote: > > Hi, > > > > I have some code like this: > > > > String name = " " + someString + " "; > > > > Is there another faster way of doing that in GWT? StringBuffer, > > StringBuilder? > > > > Thanks > > > > Fred > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~----------~----~----~----~------~----~------~--~---
