File tree Expand file tree Collapse file tree 2 files changed +2
-14
lines changed Expand file tree Collapse file tree 2 files changed +2
-14
lines changed Original file line number Diff line number Diff line change @@ -278,13 +278,7 @@ extern JL_DLLEXPORT _Atomic(uint64_t) jl_cumulative_recompile_time;
278278
279279STATIC_INLINE uint32_t jl_int32hash_fast (uint32_t a )
280280{
281- // a = (a+0x7ed55d16) + (a<<12);
282- // a = (a^0xc761c23c) ^ (a>>19);
283- // a = (a+0x165667b1) + (a<<5);
284- // a = (a+0xd3a2646c) ^ (a<<9);
285- // a = (a+0xfd7046c5) + (a<<3);
286- // a = (a^0xb55a4f09) ^ (a>>16);
287- return a ; // identity hashing seems to work well enough here
281+ return a * 0x9e3779b9 ;
288282}
289283
290284
Original file line number Diff line number Diff line change @@ -16,13 +16,7 @@ extern "C" {
1616
1717uint32_t int32hash (uint32_t a )
1818{
19- a = (a + 0x7ed55d16 ) + (a <<12 );
20- a = (a ^0xc761c23c ) ^ (a >>19 );
21- a = (a + 0x165667b1 ) + (a <<5 );
22- a = (a + 0xd3a2646c ) ^ (a <<9 );
23- a = (a + 0xfd7046c5 ) + (a <<3 );
24- a = (a ^0xb55a4f09 ) ^ (a >>16 );
25- return a ;
19+ return a * 0x9e3779b9 ;
2620}
2721
2822// FxHasher
You can’t perform that action at this time.
0 commit comments