feat(swc_es_parser): expand benchmark corpus without swc_ecma dependencies#11633
feat(swc_es_parser): expand benchmark corpus without swc_ecma dependencies#11633
Conversation
|
Binary Sizes
Commit: 7fa6333 |
Merging this PR will not alter performance
Performance Changes
Comparing |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
PR Review: expand benchmark corpus without swc_ecma dependenciesOverallGood goal — decoupling 1. File duplication (~12 MB of identical files)The 11 benchmark fixture files are byte-identical copies of the files already in Alternatives to consider:
If the intent is to keep the crates fully independent (so 2. Benchmark naming inconsistency in
|
There was a problem hiding this comment.
Pull request overview
This PR expands swc_es_parser’s Criterion benchmarks to use the same 11-file fixture corpus as swc_ecma_parser, while ensuring the swc_es_parser crate (including benches) does not reference the swc_ecma_* crate family.
Changes:
- Expanded parser/lexer benchmarks from 2 fixtures to an 11-file corpus and switched
include_str!paths to localbenches/files. - Vendored benchmark fixture files under
crates/swc_es_parser/benches/files. - Strengthened the
no_ecma_dependencytest to fail if anybenches/*.rscontains aswc_ecma_reference.
Reviewed changes
Copilot reviewed 6 out of 14 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| crates/swc_es_parser/tests/no_ecma_dependency.rs | Adds bench scanning to forbid swc_ecma_* references in benchmark Rust sources. |
| crates/swc_es_parser/benches/parser.rs | Expands parser benchmark cases and switches fixtures to local ./files/* paths. |
| crates/swc_es_parser/benches/lexer.rs | Expands lexer benchmark cases and switches fixtures to local ./files/* paths. |
| crates/swc_es_parser/benches/files/colors.js | Adds local benchmark fixture (colors). |
| crates/swc_es_parser/benches/files/angular-1.2.5.js | Adds local benchmark fixture (Angular). |
| crates/swc_es_parser/benches/files/backbone-1.1.0.js | Adds local benchmark fixture (Backbone). |
| crates/swc_es_parser/benches/files/jquery-1.9.1.js | Adds local benchmark fixture (jQuery). |
| crates/swc_es_parser/benches/files/jquery.mobile-1.4.2.js | Adds local benchmark fixture (jQuery Mobile). |
| crates/swc_es_parser/benches/files/mootools-1.4.5.js | Adds local benchmark fixture (MooTools). |
| crates/swc_es_parser/benches/files/underscore-1.5.2.js | Adds local benchmark fixture (Underscore). |
| crates/swc_es_parser/benches/files/three-0.138.3.js | Adds local benchmark fixture (three.js). |
| crates/swc_es_parser/benches/files/yui-3.12.0.js | Adds local benchmark fixture (YUI). |
| crates/swc_es_parser/benches/files/cal.com.tsx | Adds local benchmark fixture (TSX). |
| crates/swc_es_parser/benches/files/typescript.js | Adds local benchmark fixture (TypeScript compiler JS). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
Summary
Verification