-
-
Notifications
You must be signed in to change notification settings - Fork 722
perf(minifier): use arena allocated HashMap and HashSet #14079
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(minifier): use arena allocated HashMap and HashSet #14079
Conversation
|
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.
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
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. |
CodSpeed Instrumentation Performance ReportMerging #14079 will not alter performanceComparing Summary
Footnotes
|
|
If you do want to add
|
677ae7c to
612064e
Compare
612064e to
9386915
Compare
Yes, I was planning to split the PR after I verified the perf improvement. That said, it seems this change does not improve perf for the minifier. Do you think it's still good to have |
|
You are the minifier maestro, not me! Up to you... It might be worthwhile addressing my feedback on #14211 and seeing if that has any effect on benchmarks. If the iterators you create Generally speaking, allocating in arena is cheaper than heap. And if you have a ton of little But...
I don't know the ins and outs of Sorry, that's not very helpful! |
|
Side note... There's an optimization we might be be able to make if any of the iterators you create That'd probably be a fairly minor optimization, but maybe worth it if |
9386915 to
2923f93
Compare
b32ba2a to
feeba46
Compare
2923f93 to
5ec9201
Compare
feeba46 to
d50d949
Compare
I see. These HashSets are created at most (N + 1) * M times (N is the number of classes, M is the number of iterations). So I think there's little upside to use the arena allocated HashSets. I'll leave these for now, unless I find a case where the improvement is observable. |

I haven't read the code yet. I just threw some prompts to the AI while I'm working on a different thing.