RFR (S): JDK-8191328: Avoid unnecessary overhead in CRC32C

Dmitry Chuyko dmitry.chuyko at bell-sw.com
Wed Nov 15 15:27:13 UTC 2017


Please review a performance enhancement for java.util.CRC32C pure Java 

rfe: https://bugs.openjdk.java.net/browse/JDK-8191328
webrev: http://cr.openjdk.java.net/~dchuyko/8191328/webrev.00/
some results: 
mail thread on original implementation: 

I made 2 changes:

* Move ByteOrder.nativeOrder() branches outside of main loops.

* Break xors and loads into independent pairs.

In some specific cases like -Xcomp it gives 2-7x boost. The code size 
has not increased significantly.

Changes were checked by comparison with golden checksums on different 
lengths of arrays and buffers, on x86 and aarch64, though both 64-bit 


More information about the core-libs-dev mailing list