8.8% spent in Object.prototype.hasOwnProperty() on sbperftest.
authorakling@apple.com <akling@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 9 May 2014 20:28:41 +0000 (20:28 +0000)
committerakling@apple.com <akling@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 9 May 2014 20:28:41 +0000 (20:28 +0000)
commit8962f9b99f3c0d405531c9eac16b05995ce5cb4c
treeee50b015c09a149ca284a4458cf119b437857620
parent4648ebb88968a3fbaff2dcb42a493eddaf2d3798
8.8% spent in Object.prototype.hasOwnProperty() on sbperftest.
<https://webkit.org/b/132749>

Leverage the fast-resolve-to-AtomicString optimization for JSRopeString
in Object.prototype.* by using JSString::toIdentifier() in the cases where
we are converting JSString -> String -> Identifier.

This brings time spent in hasOwnProperty() from 8.8% to 1.3% on
"The Great HTML5 Gaming Performance Test: 2014 edition"
<http://www.scirra.com/demos/c2/sbperftest/>

Reviewed by Oliver Hunt.

* runtime/ObjectPrototype.cpp:
(JSC::objectProtoFuncHasOwnProperty):
(JSC::objectProtoFuncDefineGetter):
(JSC::objectProtoFuncDefineSetter):
(JSC::objectProtoFuncLookupGetter):
(JSC::objectProtoFuncLookupSetter):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@168549 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/runtime/ObjectPrototype.cpp