Micro-optimize JSON serialization of string primitives.
authorakling@apple.com <akling@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 8 May 2015 19:23:25 +0000 (19:23 +0000)
committerakling@apple.com <akling@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 8 May 2015 19:23:25 +0000 (19:23 +0000)
commitb7598d078e06b04663070e185ccc008c0a0a262a
tree34c96adf04d86621eb9535e339788aabb4d63159
parentf828999031fc886b25a579090274811f4473d1d3
Micro-optimize JSON serialization of string primitives.
<https://webkit.org/b/144800>

Reviewed by Sam Weinig.

Don't use the out-of-line JSValue::getString() to grab at string primitives
in serialization. Just check if it's a JSString and then downcast to grab at
the WTF::String inside.

2% progression on Kraken/json-stringify-tinderbox.

* runtime/JSONObject.cpp:
(JSC::Stringifier::appendStringifiedValue):

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