Optimizing String.Equals as an intrinsic (ARM64)
The fifth implementation of String.Equals. I added an intrinsic
in ARM64 which is similar to the original java implementation
of String.equals: an instanceof check, null check, length check, and
reference equality check followed by a loop comparing strings four
characters at a time starting at the beginning of the string.
Interesting Benchmarking Values:
64 Bit Nexus 9:
Intrinsic Short (1-5 Character) Strings: 40 ns
Original Short (1-5 Character) Strings: 80 ns
Intrinsic Very Long (1000+ Character) Strings: 1556 ns
Original Very Long (1000+ Character) Strings: 4554 ns
Intrinsic Non-String Argument: 15 ns
Original Non-String Argument: 62 ns
Bug: 21481923
Change-Id: If37b399614c2250f52ac709a3b50c356419ca88a
1 file changed