Skip to content
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

refactor(parser): name byte handler functions #2301

Merged
merged 1 commit into from
Feb 5, 2024

Conversation

overlookmotel
Copy link
Contributor

@overlookmotel overlookmotel commented Feb 4, 2024

This PR solves the problem of lexer byte handlers all being called core::ops::function::FnOnce::call_once in the flame graphs on CodSpeed, by defining them as named functions instead of closures.

Pure refactor, no substantive changes.

Copy link

netlify bot commented Feb 4, 2024

Deploy Preview for oxc canceled.

Name Link
🔨 Latest commit dc49b78
🔍 Latest deploy log https://app.netlify.com/sites/oxc/deploys/65bfdc213c85390008376e20

@github-actions github-actions bot added the A-parser Area - Parser label Feb 4, 2024
Copy link

codspeed-hq bot commented Feb 4, 2024

CodSpeed Performance Report

Merging #2301 will not alter performance

Comparing overlookmotel:lexer-name-byte-handlers (dc49b78) with main (018674c)

Summary

✅ 22 untouched benchmarks

@overlookmotel
Copy link
Contributor Author

It works! Lexer flame graphs are now much more revealing. Identifiers take the majority of the time, with strings (QOT handler) the runner-up.

@Boshen Boshen merged commit 9811c3a into oxc-project:main Feb 5, 2024
28 checks passed
@overlookmotel overlookmotel deleted the lexer-name-byte-handlers branch February 5, 2024 12:31
IWANABETHATGUY pushed a commit to IWANABETHATGUY/oxc that referenced this pull request May 29, 2024
This PR solves the problem of lexer byte handlers all being called
`core::ops::function::FnOnce::call_once` in the flame graphs on
CodSpeed, by defining them as named functions instead of closures.

Pure refactor, no substantive changes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-parser Area - Parser
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants