Title: [184006] trunk/Source/_javascript_Core
- Revision
- 184006
- Author
- [email protected]
- Date
- 2015-05-08 12:23:25 -0700 (Fri, 08 May 2015)
Log Message
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):
Modified Paths
Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (184005 => 184006)
--- trunk/Source/_javascript_Core/ChangeLog 2015-05-08 19:14:43 UTC (rev 184005)
+++ trunk/Source/_javascript_Core/ChangeLog 2015-05-08 19:23:25 UTC (rev 184006)
@@ -1,5 +1,21 @@
2015-05-08 Andreas Kling <[email protected]>
+ 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):
+
+2015-05-08 Andreas Kling <[email protected]>
+
Optimize serialization of quoted JSON strings.
<https://webkit.org/b/144754>
Modified: trunk/Source/_javascript_Core/runtime/JSONObject.cpp (184005 => 184006)
--- trunk/Source/_javascript_Core/runtime/JSONObject.cpp 2015-05-08 19:14:43 UTC (rev 184005)
+++ trunk/Source/_javascript_Core/runtime/JSONObject.cpp 2015-05-08 19:23:25 UTC (rev 184006)
@@ -315,9 +315,8 @@
return StringifySucceeded;
}
- String stringValue;
- if (value.getString(m_exec, stringValue)) {
- builder.appendQuotedJSONString(stringValue);
+ if (value.isString()) {
+ builder.appendQuotedJSONString(asString(value)->value(m_exec));
return StringifySucceeded;
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes