-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Switch to FxHasher hash function in bitmix - 3s faster building sys image #53844
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
base: master
Are you sure you want to change the base?
Conversation
This reverts commit 62d5814.
This reverts commit 841185a. Using bitmix is incorrect, as on 64 bit systems bitmix uses the 64 bit version of FxHasher. Also possibly a performance regression.
This reverts commit 80ee622. We have a perf regression since first commit, I've had trouble getting reliable benchmarking results so reverting this in case this caused a regression.
Co-authored-by: Stefan Karpinski <stefan@karpinski.org>
This reverts commit dd4c2f6.
dea368c to
290b542
Compare
|
@Zentrik Should we run some benchmarks on this PR? |
| #ifdef _P64 | ||
| STATIC_INLINE uint64_t bitmix(uint64_t a, uint64_t b) JL_NOTSAFEPOINT | ||
| { | ||
| return int64hash(a^bswap_64(b)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is bswap_64 still needed after this PR, or it can be removed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see it referenced elsewhere so I guess so
|
There is a downside to this that objectid is no longer a (mostly) unique identifier for a given object type in a given session, so if it isn't faster, it might not be worth doing |
|
Why is this different from whatever hash we use right now? Isn't it just switching one hash function to another? |
I'm fairly skeptical the improvement will be discernible from the noise for nanosoldier. Unfortunately, it's going to be a while before we can get instruction counts from nanosoldier. |
|
So I don't forget if I ever come back to this: looks like fxhasher was made a bit faster with rust-lang/rustc-hash@177c566. |
Doing
make cleanall; make, buildingcorecompiler.jinow takes 205-206s whilst on 4a2c593 it took 208-210s.On the allinference benchmarks in BaseBenchmarks I see a 0.5-1% improvement in instruction counts.
This is an updated version of #52496.
I recall someone sharing a profile of building Julia on the slack a while ago, if they still have it could I see which functions were calling inthash/int64hash the most.