RFR: 8317721: RISC-V: Implement CRC32 intrinsic

ArsenyBochkarev duke at openjdk.org
Tue Nov 28 14:02:27 UTC 2023


On Tue, 28 Nov 2023 13:46:07 GMT, ArsenyBochkarev <duke at openjdk.org> wrote:

> Hi all! Please review this port of `_updateBytesCRC32` intrinsic from [AArch64](https://github.com/openjdk/jdk/blob/master/src/hotspot/cpu/aarch64/stubGenerator_aarch64.cpp#L4224) (for now, plain version). 
> 
> ### Correctness checks
> Tests `test/hotspot/jtreg/compiler/codegen/CRCTest.java` and `test/hotspot/jtreg/compiler/intrinsics/zip/TestCRC32.java` are passed, in both of the `_updateBytesCRC32` was used. 
> 
> ### Performance results on T-Head board
> ##### Intrinsic disabled
> 
> (`-XX:-UseCRC32Intrinsics` flag)
> | Benchmark                      |  (count) |  Mode | Cnt |   Score |   Error |  Units |
> | ------------------------------- | --- | --- | --- | --- | --- | --- |
> | CRC32.TestCRC32.testCRC32Update  |     64 | thrpt  | 15 | 768.458 | ± 20.070 | ops/ms |
> | CRC32.TestCRC32.testCRC32Update  |    128 | thrpt  | 15 | 699.860 | ± 44.533 | ops/ms |
> | CRC32.TestCRC32.testCRC32Update  |    256 | thrpt  | 15 | 558.778 | ±  5.119 | ops/ms |
> | CRC32.TestCRC32.testCRC32Update  |    512 | thrpt  | 15 | 420.209 | ±  4.384 | ops/ms |
> | CRC32.TestCRC32.testCRC32Update  |   2048 | thrpt  | 15 | 166.945 | ±  0.817 | ops/ms |
> | CRC32.TestCRC32.testCRC32Update  |  16384 | thrpt |  15 |  25.212 | ±  0.036 | ops/ms |
> | CRC32.TestCRC32.testCRC32Update  |  65536 | thrpt |  15  |  6.222 | ±  0.040 | ops/ms |
> 
> ##### Intrinsic enabled
> 
> (`-XX:+UseCRC32Intrinsics` flag)
> 
> | Benchmark              |            (count)  |   Mode |   Cnt  |     Score |      Error |    Units |
> | ---- | ---- | ---- | ---- | ---  |  ---  |  ---  | 
> | CRC32.TestCRC32.testCRC32Update |        64 |   thrpt  |   15  |  7164.484 |  ±  17.943 |   ops/ms |
> | CRC32.TestCRC32.testCRC32Update  |      128   | thrpt  |   15  |  7065.546 |  ± 178.694  |  ops/ms |
> | CRC32.TestCRC32.testCRC32Update |       256 |   thrpt   |  15  |  7153.419 |  ±  26.696  |  ops/ms |
> | CRC32.TestCRC32.testCRC32Update   |     512 |   thrpt   |  15  |  7008.298 |  ± 235.055 |   ops/ms |
> | CRC32.TestCRC32.testCRC32Update  |     2048  |  thrpt   |  15 |   6570.959 |  ± 612.765  |  ops/ms |
> | CRC32.TestCRC32.testCRC32Update   |   16384 |   thrpt   |  15  |  7166.674 |  ±   6.639  |  ops/ms |
> | CRC32.TestCRC32.testCRC32Update  |    65536  |  thrpt   |  15  |  6918.064 |  ± 200.009  |  ops/ms |

Found an error, so closing this one for a while

-------------

PR Comment: https://git.openjdk.org/jdk/pull/16850#issuecomment-1829903061


More information about the hotspot-dev mailing list