RFR: 8313779: RISC-V: use andn / orn in the MD5 instrinsic [v2]
    Antonios Printezis 
    tonyp at openjdk.org
       
    Fri Aug  4 15:15:06 UTC 2023
    
    
  
> Small improvement of the MD5 intrinsic when the Zbb extension is available. Performance comparison (with thanks again to @robehn for this!):
> 
> before:
> 
> 
> MessageDigests.digest                   md5        64     DEFAULT  avgt    6    1835.246 ±  252.071  ns/op
> MessageDigests.digest                   md5     16384     DEFAULT  avgt    6  145386.522 ±  444.446  ns/op
> MessageDigests.getAndDigest             md5        64     DEFAULT  avgt    6    2555.515 ±  639.491  ns/op
> MessageDigests.getAndDigest             md5     16384     DEFAULT  avgt    6  149045.631 ± 6658.545  ns/op
> 
> 
> after:
> 
> 
> MessageDigests.digest                   md5        64     DEFAULT  avgt    6    1779.637 ±  207.869  ns/op
> MessageDigests.digest                   md5     16384     DEFAULT  avgt    6  137147.179 ±  706.396  ns/op
> MessageDigests.getAndDigest             md5        64     DEFAULT  avgt    6    2645.354 ± 1245.318  ns/op
> MessageDigests.getAndDigest             md5     16384     DEFAULT  avgt    6  141306.966 ± 7000.576  ns/op
> 
> 
> (only line 3 is not an improvement, but it has higher variation)
> 
> It seems to save around 5% of executed instructions.
Antonios Printezis has updated the pull request incrementally with one additional commit since the last revision:
  changes based on code review feedback
-------------
Changes:
  - all: https://git.openjdk.org/jdk/pull/15156/files
  - new: https://git.openjdk.org/jdk/pull/15156/files/a15aaaac..d7d1cfee
Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=15156&range=01
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=15156&range=00-01
  Stats: 10 lines in 3 files changed: 0 ins; 0 del; 10 mod
  Patch: https://git.openjdk.org/jdk/pull/15156.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/15156/head:pull/15156
PR: https://git.openjdk.org/jdk/pull/15156
    
    
More information about the hotspot-dev
mailing list