JDK-8307137: aarch64 MacroAssembler::lookup_interface_method could use conditional compare instead of branch
Andrew Haley
aph-open at littlepinkcloud.com
Tue May 2 07:51:06 UTC 2023
On 5/2/23 01:36, Peter Kessler OS wrote:
> I agree that for the first few elements on the key-value array, the result is not promising, because of the need to check after the loop for which condition caused the loop to exit.
Right, so it depends on the distribution of deep interface hierarchies, and
how often searches happen.
> But for searches that go further down the array, ccmp is a win on the machine I've tried it on (an Ampere Altra).
>
> Here's a table of times in nanoseconds for making 1B interface calls to various depths in an interface hierarchy, in a clone of JDK-21+19, and in JDK-21+19 with the loops done with ccmp:
>
> Test clone JDK-21+19 ccmp JDK-21+19
> Interface 1 9,753,623,061 9,751,264,492
> Interface 2 10,512,917,318 10,654,232,119
> Interface 3 11,554,908,217 11,635,931,298
> Interface 4 15,501,591,613 12,926,417,745
> Interface 5 18,472,136,372 14,559,380,750
> Interface 6 19,369,030,295 16,389,137,458
> Interface 7 20,543,012,798 18,119,622,732
> Interface 8 21,947,230,096 18,918,257,70
Thanks. Where is this benchmark?
--
Andrew Haley (he/him)
Java Platform Lead Engineer
Red Hat UK Ltd. <https://www.redhat.com>
https://keybase.io/andrewhaley
EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671
More information about the hotspot-dev
mailing list