RESOLVED FIXED 144676
Don't allocate a StringImpl for every Number JSValue in JSON.stringify().
https://bugs.webkit.org/show_bug.cgi?id=144676
Summary Don't allocate a StringImpl for every Number JSValue in JSON.stringify().
Andreas Kling
Reported 2015-05-06 00:53:46 PDT
We can do a lot better on Kraken/json-stringify-tinderbox! For example: json-stringify-tinderbox 63.370+-3.319 ^ 56.031+-3.150 ^ definitely 1.1310x faster
Attachments
Patch (1.90 KB, patch)
2015-05-06 00:54 PDT, Andreas Kling
no flags
Patch (1.88 KB, patch)
2015-05-06 01:39 PDT, Andreas Kling
darin: review+
Andreas Kling
Comment 1 2015-05-06 00:54:46 PDT
WebKit Commit Bot
Comment 2 2015-05-06 00:56:32 PDT
Attachment 252461 [details] did not pass style-queue: ERROR: Source/JavaScriptCore/runtime/JSONObject.cpp:41: Alphabetical sorting problem. [build/include_order] [4] Total errors found: 1 in 2 files If any of these errors are false positives, please file a bug against check-webkit-style.
Andreas Kling
Comment 3 2015-05-06 01:39:05 PDT
Darin Adler
Comment 4 2015-05-06 09:23:09 PDT
Comment on attachment 252462 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=252462&action=review > Source/JavaScriptCore/runtime/JSONObject.cpp:399 > + NumberToStringBuffer buffer; > + builder.append(numberToString(number, buffer)); StringBuilder has a function named appendECMAScriptNumber. I suggest you use that instead, which would make your patch even smaller.
Andreas Kling
Comment 5 2015-05-06 10:12:05 PDT
Note You need to log in before you can comment on or make changes to this bug.