lz4 / lz4-java

LZ4 compression for Java
Apache License 2.0
1.1k stars 253 forks source link

LZ4SafeUtils#commonBytes should use Arrays#mismatch #151

Open jpountz opened 4 years ago

jpountz commented 4 years ago

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.

odaira commented 4 years ago

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?

jpountz commented 4 years ago

This sounds like a good start to me!

ijuma commented 4 years ago

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