RFR: 8322179: RISC-V: Implement SHA-1 intrinsic [v3]
Hamlin Li
mli at openjdk.org
Tue Dec 19 17:54:51 UTC 2023
> Hi,
> Can you review this patch to implement SHA-1 intrinsic for riscv?
> Thanks!
>
>
> ## Test
>
> ### Functionality
>
> tests under `test/hotspot/jtreg/compiler/intrinsics/sha`
> tests found via `find test/jdk -iname "*SHA1*.java"`
>
> ### Performance
>
> tested on `T-HEAD Light Lichee Pi 4A`
>
> benchmark tests `MessageDigests.java GetMessageDigest.java MessageDigestBench.java MacBench.java` which are under `test/micro/org/openjdk/bench/`.
>
> **when intrinsic is enabled**
>
> o.o.b.java.security.GetMessageDigest.cloneInstance N/A N/A SHA-1 N/A N/A avgt 10 489.860 ? 6.277 ns/op
> o.o.b.java.security.GetMessageDigest.getInstance N/A N/A SHA-1 N/A N/A avgt 10 3477.197 ? 204.203 ns/op
> o.o.b.java.security.GetMessageDigest.getInstanceWithProvider N/A N/A SHA-1 N/A N/A avgt 10 4111.164 ? 108.861 ns/op
> o.o.b.java.security.MessageDigests.digest N/A N/A SHA-1 64 DEFAULT avgt 10 3454.207 ? 53.924 ns/op
> o.o.b.java.security.MessageDigests.digest N/A N/A SHA-1 16384 DEFAULT avgt 10 184063.834 ? 677.635 ns/op
> o.o.b.java.security.MessageDigests.getAndDigest N/A N/A SHA-1 64 DEFAULT avgt 10 8260.011 ? 150.045 ns/op
> o.o.b.java.security.MessageDigests.getAndDigest N/A N/A SHA-1 16384 DEFAULT avgt 10 191325.246 ? 3298.882 ns/op
> o.o.b.javax.crypto.full.MacBench.mac HmacSHA1 128 N/A N/A avgt 10 8220.886 ? 53.684 ns/op
> o.o.b.javax.crypto.full.MacBench.mac HmacSHA1 1024 N/A N/A avgt 10 18006.955 ? 92.432 ns/op
> o.o.b.javax.crypto.small.MessageDigestBench.digest SHA1 1048576 N/A N/A avgt 10 11688843.558 ? 34924.678 ns/op
>
>
> **when intrinsic is disabled**
>
> o.o.b.java.security.GetMessageDigest.cloneInstance N/A N/A SHA-1 N/A N/A avgt 10 496.890 ? 6.695 ns/op
> o.o.b.java.security.GetMessageDigest.getInstance N/A N/A SHA-1 N/A N/A avgt ...
Hamlin Li has updated the pull request incrementally with one additional commit since the last revision:
round 1 review
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/17130/files
- new: https://git.openjdk.org/jdk/pull/17130/files/c4dc07be..42f838a9
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=17130&range=02
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=17130&range=01-02
Stats: 54 lines in 1 file changed: 19 ins; 7 del; 28 mod
Patch: https://git.openjdk.org/jdk/pull/17130.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/17130/head:pull/17130
PR: https://git.openjdk.org/jdk/pull/17130
More information about the hotspot-dev
mailing list