that is not the issue. The building of it is actually very fast. But once I have the result s string, conversion to either utf8 or ascii takes forever in C++.
On Oct 14, 2:08 pm, Stephan Beal <[email protected]> wrote: > On Fri, Oct 14, 2011 at 11:01 PM, ajg <[email protected]> wrote: > > while ( s.length < 850 * 1024 ){ > > s += "x"; > > } > > > If you call utf8value or asciivalue on this string it takes about 2-3s > > to complete. > > You do understand that this allocates a NEW string on each concatenation, > right? JS strings are immutable - you cannot change them in-place. Changing > one creates a new copy. > > -- > ----- stephan bealhttp://wanderinghorse.net/home/stephan/ -- v8-users mailing list [email protected] http://groups.google.com/group/v8-users
