8000 perf(ast/estree): convert `NumericLiteral` `raw` field to JSON without escaping by overlookmotel · Pull Request #11562 · oxc-project/oxc · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

perf(ast/estree): convert NumericLiteral raw field to JSON without escaping #11562

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

Conversation

overlookmotel
Copy link
Contributor
@overlookmotel overlookmotel commented Jun 8, 2025

Small optimization in serializing NumericLiterals to JSON. raw field cannot contain characters which need escaping in JSON, so skip escaping.

Add support for #[estree(json_safe)] on Option<Atom> and Option<&str> fields to enable this.

Copy link
Contributor Author
overlookmotel commented Jun 8, 2025

How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • 0-merge - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

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.

@github-actions github-actions bot added A-ast Area - AST A-ast-tools Area - AST tools C-performance Category - Solution not expected to change functional behavior, only performance labels Jun 8, 2025
@overlookmotel overlookmotel marked this pull request as ready for review June 8, 2025 21:35
Copy link
codspeed-hq bot commented Jun 8, 2025

CodSpeed Instrumentation Performance Report

Merging #11562 will degrade performances by 7.79%

Comparing 06-08-perf_ast_estree_convert_numericliteral_raw_field_to_json_without_escaping (d5866e8) with main (bfa05f2)

Summary

❌ 1 regressions
✅ 37 untouched benchmarks

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Benchmarks breakdown

Benchmark BASE HEAD Change
mangler[cal.com.tsx] 2.7 ms 3 ms -7.79%

@graphite-app graphite-app bot added the 0-merge Merge with Graphite Merge Queue label Jun 9, 2025
Copy link
Contributor
graphite-app bot commented Jun 9, 2025

Merge activity

…t escaping (#11562)

Small optimization in serializing `NumericLiteral`s to JSON. `raw` field cannot contain characters which need escaping in JSON, so skip escaping.

Add support for `#[estree(json_safe)]` on `Option<Atom>` and `Option<&str>` fields to enable this.
@graphite-app graphite-app bot force-pushed the 06-08-perf_ast_estree_convert_numericliteral_raw_field_to_json_without_escaping branch from d439d49 to d5866e8 Compare June 9, 2025 02:28
@graphite-app graphite-app bot merged commit d5866e8 into main Jun 9, 2025
24 checks passed
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Jun 9, 2025
@graphite-app graphite-app bot deleted the 06-08-perf_ast_estree_convert_numericliteral_raw_field_to_json_without_escaping branch June 9, 2025 02:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-ast Area - AST A-ast-tools Area - AST tools C-performance Category - Solution not expected to change functional behavior, only performance
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant
0