RFR: 8277358: Accelerate CRC32-C [v4]
Scott Gibbons
duke at openjdk.java.net
Thu Dec 2 00:20:52 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
> -------------------------------------------------------
Scott Gibbons has updated the pull request incrementally with two additional commits since the last revision:
- MICRO to MILLI as requested.
- Fixing benchmark to throughput with default iterations.
-------------
Changes:
- all: https://git.openjdk.java.net/jdk/pull/6595/files
- new: https://git.openjdk.java.net/jdk/pull/6595/files/92b4b9fc..906a57d6
Webrevs:
- full: https://webrevs.openjdk.java.net/?repo=jdk&pr=6595&range=03
- incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=6595&range=02-03
Stats: 4 lines in 1 file changed: 0 ins; 2 del; 2 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-compiler-dev
mailing list