lz4-java
lz4-java copied to clipboard
LZ4SafeUtils#commonBytes should use Arrays#mismatch
trafficstars
When it's ok to start requiring Java 9+ (maybe now is fine since Java 11 is the current LTS release?) we should implement LZ4SafeUtils#commonBytes using Arrays#mismatch. It yielded a good compression speedup on the Lucene implementation of LZ4 compression.
Good question.... I'll reach out to important consumers of lz4-java. I can think of Kafka, Cassandra, and Spark. Would you remember anything else?
This sounds like a good start to me!
We should consider doing this via MethodHandle when the method is available. Kafka will continue to support Java 8 for a while, I believe.