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
Hello,
Please review a performance enhancement for java.util.CRC32C pure Java
implementation.
rfe: https://bugs.openjdk.java.net/browse/JDK-8191328
webrev: http://cr.openjdk.java.net/~dchuyko/8191328/webrev.00/
some results:
https://bugs.openjdk.java.net/browse/JDK-8191328?focusedCommentId=14131194&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14131194
mail thread on original implementation:
http://mail.openjdk.java.net/pipermail/core-libs-dev/2014-October/029187.html
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
Little-Endian.
-Dmitry
More information about the core-libs-dev
mailing list