[aarch64-port-dev ] [16] RFR[S]: 8251216: Implement MD5 intrinsics on AArch64
Stuart Monteith
stumon01 at arm.com
Wed Aug 12 11:38:03 UTC 2020
On 11/08/2020 11:06, Andrew Haley wrote:
> On 09/08/2020 04:19, Ludovic Henry wrote:
>> Hello,
>>
>> Bug: https://bugs.openjdk.java.net/browse/JDK-8251216
>> Webrev: http://cr.openjdk.java.net/~luhenry/8251216/webrev.00
>>
>> Testing: Linux-AArch64, fastdebug, test/hotspot/jtreg/compiler/intrinsics/sha/ test/hotspot/jtreg:tier1 test/jdk:tier1
>>
>> This patch implements the MD5 intrinsic on AArch64 following its implementation on x86 [1]. The performance
>> improvements are the following (on Linux-AArch64 on a Marvell TX2):
>>
>> -XX:-UseMD5Intrinsics
>> Benchmark (digesterName) (length) (provider) Mode Cnt Score Error Units
>> MessageDigests.digest md5 64 DEFAULT thrpt 10 1616.238 ± 28.082 ops/ms
>> MessageDigests.digest md5 1024 DEFAULT thrpt 10 215.030 ± 0.691 ops/ms
>> MessageDigests.digest md5 1048576 DEFAULT thrpt 10 0.228 ± 0.001 ops/ms
>>
>> -XX:+UseMD5Intrinsics
>> Benchmark (digesterName) (length) (provider) Mode Cnt Score Error Units
>> MessageDigests.digest md5 64 DEFAULT thrpt 10 2005.233 ± 40.513 ops/ms => 24% speedup
>> MessageDigests.digest md5 1024 DEFAULT thrpt 10 275.979 ± 0.455 ops/ms => 28% speedup
>> MessageDigests.digest md5 1048576 DEFAULT thrpt 10 0.279 ± 0.001 ops/ms => 22% speedup
>>
>> Thank you,
>> Ludovic
>>
>> [1] https://bugs.openjdk.java.net/browse/JDK-8250902
>>
>
> How did you test this? I'm looking through the test suite, but I can't
> find the test vectors. They must be in there somewhere.
>
> https://www.nist.gov/itl/ssd/software-quality-group/nsrl-test-data
>
I've been looking over this patch too. The fundamental unit test is:
test/hotspot/jtreg/compiler/intrinsics/sha/TestDigest.java
The method "testDigest" generates an byte array of a given size, with each element filled with it's own index & 0xff.
The test is then run once, assumed uncompiled, it is then "warmed up" and the first generated digest is compared against
the digest presumably generated by the intrinsic. This is the same test for all of the message digest algorithms.
I'd say the test is no worse than what has gone before. There are additional tests under the jdk library tests, but
nothing that addresses the correctness of the MD5 algorithm implementation itself.
In terms of the status-quo, that patch looks ok to me. I think if the testing is to be expanded, it should be expanded
to all of the message digest algorithms.
BR,
Stuart
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
More information about the hotspot-compiler-dev
mailing list