-
-
Notifications
You must be signed in to change notification settings - Fork 778
ci: use deterministic allocator for benchmarks #4483
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
ci: use deterministic allocator for benchmarks #4483
Conversation
|
This stack of pull requests is managed by Graphite. Learn more about stacking. Join @overlookmotel and the rest of your teammates on |
Your org has enabled the Graphite merge queue for merging into mainAdd the label “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. |
CodSpeed Performance ReportMerging #4483 will improve performances by 11.22%Comparing Summary
Benchmarks breakdown
|
|
This does seem to work in that it removes almost all variance from the benchmarks. Results for 5 dummy commits on #4485 which is on top of this PR:
Remaining problem is that changing the allocator is showing as quite a significant speed-up on many benchmarks. Probably this allocator is faster than system allocator! Need to slow it down somehow so it matches system allocator better. |
Probably doesn't matter, we are interested in relative change, not the absolute value from codspeed. |
Problem is that I think it will give us unrealistic relative results too. Let's say we introduce a change that removes a bunch of allocations, but requires some extra work to do that (caching structs, bookkeeping etc). That is very likely to be a performance gain in real world, but if the allocator we use for benchmarks makes allocation unrealistically cheap (as this one does), benchmarks will lie to us and tell us it's a perf regression. For example, with this allocator, benchmarks probably would have told us #4213 was a perf regression, whereas in fact it gave +5% speed up. NB: Allocations are a small part of the code overall. So if we're seeing 10% perf boost on some benchmarks from replacing the allocator, probably that means this new allocator is ~double the speed of the system one. That's a very big discrepancy. We might have more luck with https://crates.io/crates/dlmalloc which it sounds like is a closer analogue to the default system allocator (from |
24217f5 to
b85ec1c
Compare
This reverts commit b85ec1c.
|
Have asked for help on CodSpeed Discord: https://discord.com/channels/1065233827569598464/1065686090452828251/threads/1267428778691399690 |
|
Merge or close? |
|
Close! Have opened an issue in backlog with findings, so we can come back to this later. oxc-project/backlog#89 |


An attempt to reduce variance in benchmarks. Just testing at this stage.