perf: use rustc-hash in more places #215

Merged
ada4a merged 4 commits from ada4a/mergiraf:moar_fxhash into main 2025-02-18 13:29:31 +01:00
Owner

I made a flamegraph of integration tests, and noticed that a non-trivial amount of time was spent in Changeset::add. Digging deeper, it turned out the majority of that had to do with MultiMap, because of all the hashing it does. So I took inspiration from #40 and replaced its internal HashMaps' hashers with rustc-hash, which indeed reduced the amount of time spent. After that, a couple more bottlenecks became apparent, and I solved them using the same method.

I was testing this with the currently slowest integration test, java/working/move_and_modify_conflict, and after all the changes, its runtime went from 0.5s down to 0.4s -- not bad for a simple change like this! The runtime of the whole integration test suite has a greater variance, so it's hard to draw any definitive conclusions from it

I made a flamegraph of integration tests, and noticed that a non-trivial amount of time was spent in `Changeset::add`. Digging deeper, it turned out the majority of that had to do with `MultiMap`, because of all the hashing it does. So I took inspiration from #40 and replaced its internal `HashMap`s' hashers with rustc-hash, which indeed reduced the amount of time spent. After that, a couple more bottlenecks became apparent, and I solved them using the same method. I was testing this with the currently slowest integration test, `java/working/move_and_modify_conflict`, and after all the changes, its runtime went from 0.5s down to 0.4s -- not bad for a simple change like this! The runtime of the whole integration test suite has a greater variance, so it's hard to draw any definitive conclusions from it
wetneb approved these changes 2025-02-18 10:46:11 +01:00
ada4a merged commit 9f4ae97318 into main 2025-02-18 13:29:31 +01:00
ada4a deleted branch moar_fxhash 2025-02-18 13:29:33 +01:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: mergiraf/mergiraf#215
No description provided.