RFR: 8277358: Accelerate CRC32-C
Scott Gibbons
duke at openjdk.java.net
Mon Nov 29 14:52:17 UTC 2021
Accelerates CRC32-C by utilizing vpclmulqdq similarly to CRC32. This change achieves ~4x throughput improvement.
5986.947899319073 MB/s => 24041.05203089616 MB/s
5840.02689336947 MB/s => 24898.781468710356 MB/s
********** Original ***********
scottgi at 96974-ICX32:~/crc/jdk (asgibbons-crc32c)$ java test/hotspot/jtreg/compiler/intrinsics/zip/TestCRC32C.java 20000000
offset = 0
msgSize = 512 bytes
iters = 20000000
-------------------------------------------------------
CRCs: crc = ae10ee5a, crcReference = ae10ee5a
CRC32C.update(byte[]) runtime = 1.710387358 seconds
CRC32C.update(byte[]) throughput = 5986.947899319073 MB/s
CRCs: crc = ae10ee5a, crcReference = ae10ee5a
-------------------------------------------------------
CRCs: crc = ae10ee5a, crcReference = ae10ee5a
CRC32C.update(ByteBuffer) runtime = 1.753416583 seconds
CRC32C.update(ByteBuffer) throughput = 5840.02689336947 MB/s
CRCs: crc = ae10ee5a, crcReference = ae10ee5a
-------------------------------------------------------
*********** With my changes: *************
scottgi at 96974-ICX32:~/crc/jdk (asgibbons-crc32c)$ java test/hotspot/jtreg/compiler/intrinsics/zip/TestCRC32C.java 20000000
offset = 0
msgSize = 512 bytes
iters = 20000000
-------------------------------------------------------
CRCs: crc = ae10ee5a, crcReference = ae10ee5a
CRC32C.update(byte[]) runtime = 0.425938099 seconds
CRC32C.update(byte[]) throughput = 24041.05203089616 MB/s
CRCs: crc = ae10ee5a, crcReference = ae10ee5a
-------------------------------------------------------
CRCs: crc = ae10ee5a, crcReference = ae10ee5a
CRC32C.update(ByteBuffer) runtime = 0.411265106 seconds
CRC32C.update(ByteBuffer) throughput = 24898.781468710356 MB/s
CRCs: crc = ae10ee5a, crcReference = ae10ee5a
-------------------------------------------------------
-------------
Commit messages:
- Merge branch 'asgibbons-crc32c' of https://github.com/asgibbons/jdk into asgibbons-crc32c
- Merge branch 'master' into asgibbons-crc32c
- Asgibbons crc32c (#7)
- Merge branch 'openjdk:master' into master
- Revert .gitignore change
- Move register save to within conditional; add comments
- Bad merge.
- Merge branch 'asgibbons-crc32c' of https://github.com/asgibbons/jdk into asgibbons-crc32c
- ZZMerge branch 'asgibbons-crc32c' of https://github.com/asgibbons/jdk into asgibbons-crc32c
- Use existing CRC32 code with different table for CRC32-C
- ... and 203 more: https://git.openjdk.java.net/jdk/compare/e9b36a83...10aeaec6
Changes: https://git.openjdk.java.net/jdk/pull/6595/files
Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=6595&range=00
Issue: https://bugs.openjdk.java.net/browse/JDK-8277358
Stats: 62 lines in 4 files changed: 40 ins; 1 del; 21 mod
Patch: https://git.openjdk.java.net/jdk/pull/6595.diff
Fetch: git fetch https://git.openjdk.java.net/jdk pull/6595/head:pull/6595
PR: https://git.openjdk.java.net/jdk/pull/6595
More information about the hotspot-dev
mailing list