perf: various optimizations to eliminate branch misprediction in hash_utils#20168
perf: various optimizations to eliminate branch misprediction in hash_utils#20168notashes wants to merge 2 commits intoapache:mainfrom
Conversation
|
it would be great to first merge a benchmark into |
|
hey @adriangb, the benchmarks to test changes already exist in
here are some numbers: But I'm curious do we also want to benchmark cases where the values contain nulls? let me know what you think |
|
run benchmark with_hashes |
|
🤖 |
|
🤖: Benchmark completed Details
|
Which issue does this PR close?
Rationale for this change
Compile time monomorphization helps bring
rehashoutside the hot loop where it's not required.What changes are included in this PR?
Currently the PR adds a specialized
hash_dictionary_inner()function with const generic parameters that check for nulls in keys, values. It also handles specific edge cases of just nulls in keys or values.Are these changes tested?
There are no additional tests yet. But I will add 'em as I continue. The benchmark results seem promising.
here's
cargo bench --bench with_hashes -- dictionaryfororigin/main
feat/brunch-prediction
Are there any user-facing changes?