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
by adding a new optimized reflective type seems the right thing, it can hide some subtle potential regressions and behaviours which should be considered, ie
new CRC32C is available only after Java >= 9, differently from CRC32 which existing from long time (java 1.1)
, the Method::invoke which piggyback to an invokeinterface (see https://docs.oracle.com/javase/8/docs/api/java/util/zip/Checksum.html) making it no longer bi-morphic because we will have a third JDK Checksum receiver which call the update method, potentially slowing down everyone (I have a solution for that, actually, but is not nide :P ) (- the same problem happen at
Snappy protocol seems to leverage to our Netty CRC32C using a big lookup table and no CPU-specific intrinsics to perform xoring etc etc; OpenJDK seems to have what we need, see https://github.com/openjdk/jdk/blob/52d497619e58a5677bc4a015b1bd87f600f23837/src/java.base/share/classes/java/util/zip/CRC32C.java#L218
It would be nice to:
byte[]
batch intrinsified method at https://github.com/openjdk/jdk/blob/52d497619e58a5677bc4a015b1bd87f600f23837/src/java.base/share/classes/java/util/zip/CRC32C.java#L218NOTE:
although modfying
netty/codec/src/main/java/io/netty/handler/codec/compression/ByteBufChecksum.java
Line 35 in e5951d4
new CRC32C
is available only after Java >= 9, differently fromCRC32
which existing from long time (java 1.1)Chechsum
wrapping vianetty/codec/src/main/java/io/netty/handler/codec/compression/ByteBufChecksum.java
Line 106 in e5951d4
Method::invoke
which piggyback to aninvokeinterface
(see https://docs.oracle.com/javase/8/docs/api/java/util/zip/Checksum.html) making it no longer bi-morphic because we will have a third JDKChecksum
receiver which call the update method, potentially slowing down everyone (I have a solution for that, actually, but is not nide :P ) (- the same problem happen atnetty/codec/src/main/java/io/netty/handler/codec/compression/ByteBufChecksum.java
Line 129 in e5951d4
The text was updated successfully, but these errors were encountered: