perf(ast/estree): faster JSON serialization of empty arrays#9896
Conversation
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
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 Performance ReportMerging #9896 will not alter performanceComparing Summary
|
|
Makes no difference. The perf regression must just have been due to adding weight to every |

#9863 hurt performance of serializing AST to JSON by 8%. This may just have been that
Identifiers are so common that adding more bulk to them is costly. But it might also be that serializing[(); 0]is expensive.Introduce an
EmptyArrayobject which is as fast as possible to serialize.Let's see if it helps...