lz4-java icon indicating copy to clipboard operation
lz4-java copied to clipboard

LZ4SafeUtils#commonBytes should use Arrays#mismatch

Open jpountz opened this issue 4 years ago • 3 comments

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.

jpountz avatar Oct 31 '19 16:10 jpountz

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?

odaira avatar Oct 31 '19 19:10 odaira

This sounds like a good start to me!

jpountz avatar Nov 07 '19 23:11 jpountz

We should consider doing this via MethodHandle when the method is available. Kafka will continue to support Java 8 for a while, I believe.

ijuma avatar Nov 30 '19 22:11 ijuma