Skip to content

perf(es/parser): Reduce clone of token contexts #10364

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

Merged
merged 1 commit into from
Apr 12, 2025
Merged

Conversation

bvanjoi
Copy link
Contributor

@bvanjoi bvanjoi commented Apr 12, 2025

I will close this if it's not shown any improvements.

@bvanjoi bvanjoi requested a review from a team as a code owner April 12, 2025 09:55
Copy link

changeset-bot bot commented Apr 12, 2025

⚠️ No Changeset found

Latest commit: 3325cc7

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

codspeed-hq bot commented Apr 12, 2025

CodSpeed Performance Report

Merging #10364 will improve performances by 2.47%

Comparing bvanjoi:pref-2 (3325cc7) with main (eb7f7e9)

Summary

⚡ 1 improvements
✅ 151 untouched benchmarks

Benchmarks breakdown

Benchmark BASE HEAD Change
es/lints/libs/terser 29.9 ms 29.2 ms +2.47%

@kdy1 kdy1 changed the title pref(es/parser): less clone for token ctxs perf(es/parser): Reduce clone of token contexts Apr 12, 2025
@kdy1 kdy1 added this to the Planned milestone Apr 12, 2025
@kdy1
Copy link
Member

kdy1 commented Apr 12, 2025

It seems like it's about 0.2% ~ 0.5% faster. I looked at the performance details in https://codspeed.io/swc-project/swc/branches/bvanjoi%3Apref-2

@kdy1 kdy1 merged commit 3ab47b2 into swc-project:main Apr 12, 2025
166 checks passed
@kdy1 kdy1 modified the milestones: Planned, v1.11.21 Apr 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants