Status: New
Owner: ----

New issue 1665 by [email protected]: Writing a cons string with v8::String::Utf8Write is inefficient
http://code.google.com/p/v8/issues/detail?id=1665

Converting a long cons string that consists of many 'pieces' to utf8 very inefficient.

This is caused by v8::internal::String::ReadBlock reading only 1024 bytes from the string at a time, so gets called v8::internal::ConsString::ConsStringReadBlock many times. Every time ConsStringReadBlock is called that function walks the entire cons chain, starting at last piece, until it arrives at the right offset. Hence Utf8Write time scales O(n^2) with respect to the number of pieces that the cons string has.


--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to