Skip to content

Comments

perf(transformer/arrow-function): reduce string comparisons#7318

Closed
overlookmotel wants to merge 1 commit into11-16-tests_transformer_async-to-generator_failing_test_for_nested_supersfrom
11-16-perf_transformer_arrow-function_reduce_string_comparisons
Closed

perf(transformer/arrow-function): reduce string comparisons#7318
overlookmotel wants to merge 1 commit into11-16-tests_transformer_async-to-generator_failing_test_for_nested_supersfrom
11-16-perf_transformer_arrow-function_reduce_string_comparisons

Conversation

@overlookmotel
Copy link
Member

@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.

@graphite-app
Copy link
Contributor

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.

Copy link
Member Author

overlookmotel commented Nov 16, 2024

@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
@codspeed-hq
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
Member 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