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(mangler): reduce hash table lookups #8558

Conversation

overlookmotel
Copy link
Contributor

@overlookmotel overlookmotel commented Jan 17, 2025

When getting the list of symbol names for slots, pre-prepare a single hash set of all unavailable symbol names. Then in the loop which generates symbol names, only 1 hash table lookup is required for each name.

Copy link
Contributor Author

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • 0-merge - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

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

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@github-actions github-actions bot added the C-performance Category - Solution not expected to change functional behavior, only performance label Jan 17, 2025
@overlookmotel overlookmotel added the A-minifier Area - Minifier label Jan 17, 2025
@overlookmotel overlookmotel force-pushed the 01-17-perf_mangler_reduce_hash_table_lookups branch from a56cdcb to d2a510b Compare January 17, 2025 01:48
Copy link

codspeed-hq bot commented Jan 17, 2025

CodSpeed Performance Report

Merging #8558 will not alter performance

Comparing 01-17-perf_mangler_reduce_hash_table_lookups (d2a510b) with 01-17-perf_mangler_optimize_base54_function (24bbdb7)

Summary

✅ 32 untouched benchmarks

@overlookmotel
Copy link
Contributor Author

Better on 2 benchmarks (+2%) but worse on 1 (-1%). Not worthwhile.

@overlookmotel overlookmotel deleted the 01-17-perf_mangler_reduce_hash_table_lookups branch January 17, 2025 02:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-minifier Area - Minifier 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