accelerate ByteArray.hashCode#7622
Conversation
e8e51a0 to
4f6eabe
Compare
4f6eabe to
d4b1136
Compare
Jackie-Jiang
left a comment
There was a problem hiding this comment.
We are replacing the JDK implementation with our own, and I feel JIT might be able to optimize on the JDK default method, and the benchmark might have different result in different environment. If some new optimizations are introduced in the future java version, we won't be able to get that. Do you think this method might be slower in certain environments?
As far as I am aware there is no Java or C++ compiler capable of performing this transformation, as simple as it is. It's possible that this will be treated with a vectorized intrinsic (the same trick is scalable) in the future, but Pinot doesn't run on JDK16 without adding a lot of |
Codecov Report
@@ Coverage Diff @@
## master #7622 +/- ##
============================================
- Coverage 71.61% 71.60% -0.01%
- Complexity 3938 3941 +3
============================================
Files 1562 1562
Lines 79370 79376 +6
Branches 11748 11750 +2
============================================
- Hits 56843 56841 -2
- Misses 18692 18697 +5
- Partials 3835 3838 +3
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
Jackie-Jiang
left a comment
There was a problem hiding this comment.
LGTM. This video gives some context to the optimization: https://youtu.be/PnVw1uFxSyw?t=586
Description
Speed up
ByteArray.hashCodewhich speeds up building column statistics. Unfortunately the algorithm needs to be maintained in case it has been used for partitioning, but it can be sped up easily by breaking a data dependency in the loop.Upgrade Notes
Does this PR prevent a zero down-time upgrade? (Assume upgrade order: Controller, Broker, Server, Minion)
backward-incompat, and complete the section below on Release Notes)Does this PR fix a zero-downtime upgrade introduced earlier?
backward-incompat, and complete the section below on Release Notes)Does this PR otherwise need attention when creating release notes? Things to consider:
release-notesand complete the section on Release Notes)Release Notes
Documentation