| Summary: | Don't allocate a StringImpl for every Number JSValue in JSON.stringify(). | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Andreas Kling <kling> | ||||||
| Component: | JavaScriptCore | Assignee: | Andreas Kling <kling> | ||||||
| Status: | RESOLVED FIXED | ||||||||
| Severity: | Normal | CC: | benjamin, commit-queue, ggaren, kling, msaboff | ||||||
| Priority: | P2 | Keywords: | Performance | ||||||
| Version: | 528+ (Nightly build) | ||||||||
| Hardware: | Unspecified | ||||||||
| OS: | Unspecified | ||||||||
| Attachments: |
|
||||||||
|
Description
Andreas Kling
2015-05-06 00:53:46 PDT
Created attachment 252461 [details]
Patch
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.
Created attachment 252462 [details]
Patch
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. Committed r183874: <http://trac.webkit.org/changeset/183874> |