-
-
Notifications
You must be signed in to change notification settings - Fork 595
perf(ast/estree): faster serializing strings to JSON #11753
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
perf(ast/estree): faster serializing strings to JSON #11753
Conversation
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
CodSpeed Instrumentation Performance ReportMerging #11753 will degrade performances by 13.11%Comparing Summary
Benchmarks breakdown
|
a055e05
to
7753796
Compare
1% perf improvement on ESTree benchmark. Would probably show a larger effect on a file which is string-heavy e.g. RadixUI benchmark. |
1ebaf29
to
f953447
Compare
Merge activity
|
Speed up serializing strings to JSON, using a trick I found in Chromium's code, to check a batch of 8 bytes in one go for characters needing escaping, rather than checking bytes 1 by 1. https://chromium.googlesource.com/v8/v8/+/1645281bbd1b183a252835d376166bd210135bbe/src/json/json-stringifier.cc#521
f953447
to
c4faee2
Compare
Speed up serializing strings to JSON, using a trick I found in Chromium's code, to check a batch of 8 bytes in one go for characters needing escaping, rather than checking bytes 1 by 1.
https://chromium.googlesource.com/v8/v8/+/1645281bbd1b183a252835d376166bd210135bbe/src/json/json-stringifier.cc#521