RFR[M]: Adding MD5 Intrinsic on x86-64

Vivek Deshpande viv.desh at gmail.com
Fri Jul 31 04:17:21 UTC 2020


Hi Ludovic

Your patch looks good to me. Good reuse of existing code for SHA.
You have not added the stub generation for 32 bit.
Did you also test with a 32 bit build?
Thank you.

Regards,
Vivek

On Thu, Jul 30, 2020 at 6:26 PM Ludovic Henry <luhenry at microsoft.com> wrote:

> JBS: I just got authorship status and I'll create a bug as soon as I have
> access to JBS
> Webrev: http://cr.openjdk.java.net/~luhenry/md5-intrinsics/webrev.00/
>
> The problem ended up not being with how `ofs` was incremented, but with a
> callee-saved register not being restored properly before returning from the
> intrinsic.
>
> The performance results from running with JMH are very encouraging. I ran
> the `org.openjdk.bench.java.security.MessageDigests` with MD5 only enabled,
> and following are the results with and without the intrinsic.
>
> -XX:-UseMD5Intrinsics
> Benchmark              (digesterName)  (length)  (provider)   Mode  Cnt
>  Score    Error   Units
> MessageDigests.digest             md5        64     DEFAULT  thrpt   10
> 3459.747 ± 10.508  ops/ms
> MessageDigests.digest             md5      1024     DEFAULT  thrpt   10
>  446.407 ±  3.383  ops/ms
> MessageDigests.digest             md5     16384     DEFAULT  thrpt   10
> 30.685 ±  0.676  ops/ms
> MessageDigests.digest             md5   1048576     DEFAULT  thrpt   10
>  0.483 ±  0.004  ops/ms
>
> -XX:+UseMD5Intrinsics
> Benchmark              (digesterName)  (length)  (provider)   Mode  Cnt
>  Score    Error   Units
> MessageDigests.digest             md5        64     DEFAULT  thrpt   10
> 4011.556 ± 10.212  ops/ms
> MessageDigests.digest             md5      1024     DEFAULT  thrpt   10
>  526.873 ±  2.101  ops/ms
> MessageDigests.digest             md5     16384     DEFAULT  thrpt   10
> 35.012 ±  0.088  ops/ms
> MessageDigests.digest             md5   1048576     DEFAULT  thrpt   10
>  0.573 ±  0.002  ops/ms
>
> That's overall a jump from ~483MB/s to ~573MB/s on the 1M chunks, or a
> ~19% speedup.
>
> Thank you,
> Ludovic
>


-- 
Thanks and Regards,

Vivek Deshpande
viv.desh at gmail.com


More information about the hotspot-compiler-dev mailing list