You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As it is only supported since Java9, we can implement it in a similar way like Crc32C. (the method can get the running JDK environment, if Java9 use the support Arrays.compare() method).
Note: Micro benchmarks is needed to compute the benefits of new Arrays.compare() on JDK9.
Solution
No response
Anything else?
No response
Willingness to contribute
I'm willing to submit a PR!
The text was updated successfully, but these errors were encountered:
wuchong
changed the title
[Feature] Change the RocksDBKv#isPrefixEquals() to Arrays.compare(compare(byte[] a, int aFromIndex, int aToIndex, byte[] b, int bFromIndex, int bToIndex)) in JDK9
[Feature] Use JDK9 Arrays.compare to check bytes prefix for PrefixLookup
Jan 2, 2025
Search before asking
Motivation
Currently,
RocksDBKv#isPrefixEquals()
very inefficient to compare arrays byte by byte. Java9 provides a more efficient way Arrays.compare(compare(byte[] a, int aFromIndex, int aToIndex, byte[] b, int bFromIndex, int bToIndex)), underlying it leverages SIMD instructions.As it is only supported since Java9, we can implement it in a similar way like Crc32C. (the method can get the running JDK environment, if Java9 use the support
Arrays.compare()
method).Note: Micro benchmarks is needed to compute the benefits of new
Arrays.compare()
on JDK9.Solution
No response
Anything else?
No response
Willingness to contribute
The text was updated successfully, but these errors were encountered: