[aarch64-port-dev ] 回复:RFR: 8149733: AArch64: refactorchar_array_equals/byte_array_equals/string_equals
Andrew Haley
aph at redhat.com
Tue Feb 23 16:17:52 UTC 2016
My version is at
http://cr.openjdk.java.net/~aph/8149733/
The changes I made are:
I rewrote most of the comments because I couldn't understand
them. I intend no criticism, and I understand that English
isn't the language of your birth. Please tell me if you can
understand my comments.
"generic_array_equals" -> "arrays_equals"
Reason: it's not generic, it's only bytes and chars.
Also, this is what x86_64 calls the same routine.
"ary1" -> "a"
Reason: "ary" just looks odd. Also, these are the names in the
java code.
"cmp; br.nz" -> "eor, bnz"
Reason: Don't clobber flags for no reason.
There's no need to check for the same arrays if we're
comparing strings.
Otherwise, the code is the same. I haven't much tested this, but it
should give the same performance. Please test it, and tell me if I've
broken anything.
Thanks,
Andrew.
More information about the aarch64-port-dev
mailing list