-
Notifications
You must be signed in to change notification settings - Fork 432
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: Don't hash the key when searching in empty hash tables #2471
Conversation
@hargoniX, I think anyone is allowed to run !bench |
Apparently not! @Kha, I'm presuming you need to sprinkle some magic permissions bits here? |
!bench |
Here are the benchmark results for commit 1262a41. |
|
|
Here are the bench results on Mathlib: http://speed.lean-fro.org/mathlib4/compare/93695581-e592-41ad-9a6a-53fe2cce9e75/to/e760a006-736d-49ba-b9b4-d6d79e4f697f. I think without any interesting performance gain we can put this one to rest? |
@digama0 would you like to have this optimization on the std4 HashMap? |
I was planning on it if this landed, but if the performance impact isn't there I'm not sure. The results seem to be slightly negative. |
|
Based on: rust-lang/hashbrown#305
Judging from the rustc benchmarks this can save significant amounts of instructions and seems like quite a simple change. It is however unclear to me whether we do have the usage pattern of HashMaps that they do somewhere so it might possibly be useless for us as well. I don't have a local benchmark setup so we have to run performance tests here if we are interested in this. I'm guessing I don't have the privileges for that?