LGTM

One thing you might look into in a new CL is traversing the string twice
to first count the number of lines and then allocate a FixedArray of the
right size and filling it on second traversal. Using a JSArray will
result in element copying each time the underlying FixedArray is grown,
and the AddKeysFromJSArray also copies all the elements. I don't know
whether the difference would be measurable. See NewElementsCapacity for
the growth factor. Also at size kMaxFastElementsLength (5000) the
JSArray will move to slow (dictionary) case.

http://codereview.chromium.org/19537

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

Reply via email to