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

perf(parser): optimize lexing strings #2366

Merged
merged 1 commit into from
Feb 9, 2024

Conversation

overlookmotel
Copy link
Collaborator

@overlookmotel overlookmotel commented Feb 9, 2024

Optimize lexing strings a bit.

@github-actions github-actions bot added the A-parser Area - Parser label Feb 9, 2024
@overlookmotel
Copy link
Collaborator Author

Current dependencies on/for this PR:

This stack of pull requests is managed by Graphite.

@overlookmotel overlookmotel marked this pull request as draft February 9, 2024 13:27
Copy link

codspeed-hq bot commented Feb 9, 2024

CodSpeed Performance Report

Merging #2366 will improve performances by 4.83%

Comparing 02-09-perf_parser_optimize_lexing_strings (38b7d79) with main (d6d921e)

Summary

⚡ 1 improvements
✅ 26 untouched benchmarks

Benchmarks breakdown

Benchmark main 02-09-perf_parser_optimize_lexing_strings Change
lexer[cal.com.tsx] 33 ms 31.5 ms +4.83%

@overlookmotel overlookmotel force-pushed the 02-09-perf_parser_optimize_lexing_strings branch from 44b0d84 to 8544f1f Compare February 9, 2024 14:12
@overlookmotel overlookmotel force-pushed the 02-09-perf_parser_optimize_lexing_strings branch from 4aeb664 to 38b7d79 Compare February 9, 2024 15:20
@overlookmotel overlookmotel marked this pull request as ready for review February 9, 2024 15:20
@overlookmotel
Copy link
Collaborator Author

overlookmotel commented Feb 9, 2024

This is as good as I can do for now. Still a bit disappointing, but ready for merge now if you're willing.

As discussed on #2353, the increasing use of macros may be a concern. But could we go with it for now? If we introduce SIMD, or implement #2368, the macro will change a lot, and it'd be easier to keep those changes in one place (the macro) until it's fairly locked. At that point, as you said, if the macros slow down compilation we could expand them all manually.

@Boshen
Copy link
Member

Boshen commented Feb 9, 2024

But could we go with it for now?

Of course! Improve then refactor.

@Boshen Boshen merged commit 0be8397 into main Feb 9, 2024
22 checks passed
@Boshen Boshen deleted the 02-09-perf_parser_optimize_lexing_strings branch February 9, 2024 15:52
@overlookmotel
Copy link
Collaborator Author

Of course! Improve then refactor.

Thanks Boshen!

IWANABETHATGUY pushed a commit to IWANABETHATGUY/oxc that referenced this pull request May 29, 2024
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.

None yet

2 participants