2009-05-19 Maciej Stachowiak <mjs@apple.com>
authormjs@apple.com <mjs@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 19 May 2009 08:01:22 +0000 (08:01 +0000)
committermjs@apple.com <mjs@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 19 May 2009 08:01:22 +0000 (08:01 +0000)
commitf2d578f065dc2014c9a23953eb7215a5b934deec
tree20ee18e38c0c2a9ccbf28568f54ec5c7292b9181
parentfaff745a8533e6fc3a574b212b8348cd9fbbc71c
2009-05-19  Maciej Stachowiak  <mjs@apple.com>

        Reviewed by Gavin Barraclough.

        - speed up string comparison, especially for short strings

        ~1% on SunSpider

        * JavaScriptCore.exp:
        * runtime/UString.cpp:
        * runtime/UString.h:
        (JSC::operator==): Inline UString's operator==, since it is called from
        hot places in the runtime. Also, specialize 2-char strings in a similar way to
        1-char, since we're taking the hit of a switch anyway.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@43856 268f45cc-cd09-0410-ab3c-d52691b4dbfc
JavaScriptCore/ChangeLog
JavaScriptCore/JavaScriptCore.exp
JavaScriptCore/runtime/UString.cpp
JavaScriptCore/runtime/UString.h