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(transformer/arrow-function): reduce string comparisons #7318

Conversation

overlookmotel
Copy link
Contributor

@overlookmotel overlookmotel commented Nov 16, 2024

Experiment. Try avoiding string comparisons in most cases for IdentifierReferences and BindingIdentifiers. Not sure if this will be faster or not.

Copy link

graphite-app bot commented Nov 16, 2024

Your org has enabled the Graphite merge queue for merging into main

Add the label “0-merge” to the PR and Graphite will automatically add it to the merge queue when it’s ready to merge. Or use the label “hotfix” to add to the merge queue as a hot fix.

You must have a Graphite account and log in to Graphite in order to use the merge queue. Sign up using this link.

@github-actions github-actions bot added A-transformer Area - Transformer / Transpiler C-performance Category - Solution not expected to change functional behavior, only performance labels Nov 16, 2024
Copy link

codspeed-hq bot commented Nov 16, 2024

CodSpeed Performance Report

Merging #7318 will degrade performances by 10.07%

Comparing 11-16-perf_transformer_arrow-function_reduce_string_comparisons (2d0e72c) with main (cf3415b)

Summary

❌ 3 regressions
✅ 27 untouched benchmarks

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Benchmarks breakdown

Benchmark main 11-16-perf_transformer_arrow-function_reduce_string_comparisons Change
transformer[antd.js] 45.3 ms 48.7 ms -6.82%
transformer[checker.ts] 18 ms 20 ms -10.07%
transformer[pdf.mjs] 6.6 ms 7 ms -6.43%

@overlookmotel overlookmotel force-pushed the 11-16-perf_transformer_arrow-function_reduce_string_comparisons branch from ef8b94b to 2d0e72c Compare November 16, 2024 19:04
@overlookmotel
Copy link
Contributor Author

The benchmarks above are misleading. Codspeed is comparing to main, instead of PR below in stack. So result above includes the perf hit of #7234.

This does appear to help very marginally, but not enough to be worthwhile.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-transformer Area - Transformer / Transpiler C-performance Category - Solution not expected to change functional behavior, only performance
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant