When working on this patch I thought Rico's JSON scanner/parser change
was already in, but it remains a performance improvement even after
Rico's change. The loops I changed are called after the length and the
hash codes have been checked, so the strings are very likely to be
equal. Trying to cover more cases (as Erik suggested) only makes the
fast case slower, unfortunately.


Thanks,
Vitaly

On Tue, May 24, 2011 at 11:14 AM,  <[email protected]> wrote:
> DBC
>
>
> http://codereview.chromium.org/7064017/diff/1/src/objects.cc
> File src/objects.cc (right):
>
> http://codereview.chromium.org/7064017/diff/1/src/objects.cc#newcode5512
> src/objects.cc:5512: if (IsFlat() && IsAsciiRepresentation()) {
> CompareChars doesn't require that the two strings have the same width,
> so you can speed up the operation for ASCII-UC16 and UC16-ASCII
> comparisons too.
>
> http://codereview.chromium.org/7064017/
>

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

Reply via email to