RFR: 8149733: AArch64: refactor char_array_equals/byte_array_equals/string_equals
Aleksey Shipilev
aleksey.shipilev at oracle.com
Tue Feb 23 10:01:28 UTC 2016
On 02/22/2016 02:56 PM, Hui Shi wrote:
> Thanks Aleksey & Andrew!
>
> Patch is updated in http://cr.openjdk.java.net/~hshi/8149733/webrev2/
> <http://cr.openjdk.java.net/%7Ehshi/8149733/webrev2/> , it adds on
> 1. Fix misc spelling and format issues
> 2. Use cnt2 for array length compare, comment that cnt2 can’t be used
> after length compare
> 3. Add more comments for tail handling
Still not getting this part:
4526 cmp(ary1, ary2);
4527 mov(result, false);
4528 br(Assembler::EQ, SAME);
Should the mov be *after* the branch?
Also, "if (is_string_equal == false) {" should be "if (!is_string_equals)".
> JMH test
> in http://cr.openjdk.java.net/~hshi/8149733/webrev2/JMHSample_97_ArrayEqual.java
> <http://cr.openjdk.java.net/%7Ehshi/8149733/webrev2/JMHSample_97_ArrayEqual.java>
> . Run with java -jar ../benchmarks.jar '.*JMHSample_97*' -w 5 -wi 3 -i 5
> -r 10 -f 0
Um, -f 0 is bad: you contaminate the profiles. Also, the benchmark could
be made much more idiomatic, solving a few other benchmarking pitfalls:
http://cr.openjdk.java.net/~shade/scratch/ByteArrayEquals.java
You might want to re-run with your updated code.
Cheers,
-Aleksey
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/attachments/20160223/f2033537/signature.asc>
More information about the hotspot-compiler-dev
mailing list