ci(benchmarks): benchmark parser with tokens and ESTree tokens conversion#19649
Conversation
Merging this PR will not alter performance
Performance Changes
Comparing Footnotes
|
There was a problem hiding this comment.
Pull request overview
This PR adds two new benchmark functions to measure the performance of parsing with tokens and converting tokens to ESTree-style JSON format. These benchmarks complement the existing parser and ESTree benchmarks and will help optimize the token handling code.
Changes:
- Added
bench_parser_tokensto benchmark parsing with token collection enabled - Added
bench_estree_tokensto benchmark ESTree token serialization to JSON - Added
oxc_estree_tokensdependency to the benchmark crate
Reviewed changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| tasks/benchmark/benches/parser.rs | Added two new benchmark functions (bench_parser_tokens and bench_estree_tokens) and updated the criterion_group to include them |
| tasks/benchmark/Cargo.toml | Added oxc_estree_tokens as an optional dependency and included it in the "compiler" feature |
| Cargo.lock | Updated lock file to reflect the new dependency in the benchmark crate |
d4ac87a to
0a4edbb
Compare
ee09cd5 to
7377b75
Compare
0a4edbb to
1349954
Compare
7377b75 to
3d2d7c1
Compare
Fix a typo spotted by AI review in #19649.

Add benchmarks for:
Neither of these benchmarks needs to be kept indefinitely, but they'll be useful while working on the tokens code. There's a lot of room for optimization.