perf(parser): apply #[cold] attribute to error handling functions#14188
perf(parser): apply #[cold] attribute to error handling functions#14188graphite-app[bot] merged 1 commit intomainfrom
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. |
There was a problem hiding this comment.
Pull Request Overview
Apply the #[cold] attribute to error handling functions in the parser to improve performance by optimizing code layout for hot paths.
- Mark error handling functions as
#[cold]to help LLVM optimize instruction cache utilization - Target functions that only execute during parsing errors or rare edge cases
- Exclude lexer from optimization as requested
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| crates/oxc_parser/src/lib.rs | Mark overlong_error() as cold for handling >4GB files |
| crates/oxc_parser/src/js/class.rs | Mark check_getter() and check_setter() as cold for validation errors |
| crates/oxc_parser/src/error_handler.rs | Mark set_unexpected() and unexpected() as cold for error paths |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Merge activity
|
CodSpeed Instrumentation Performance ReportMerging #14188 will not alter performanceComparing Summary
|
dcac5ce to
5b74a81
Compare
No description provided.