Re: 回复:Math: optimation for doing remainder on AArch64

Andrew Haley aph-open at littlepinkcloud.com
Mon Apr 15 08:08:56 UTC 2024


On 4/15/24 03:12, Jin Guojie wrote:
> The reason for this optimization is that we found that there are a large
>   number of remainder operations in the jdk class library, and the
> frequency of these remainder operations is very high, which has a great
> impact on performance. These remainder operations are frequently used in
>   fundamental libraries such as java.lang.String and java.lang.HashMap.
[ Note: always use AArch64 in the title for AArch64-specific discussion.]

I couldn't find any uses of remainder in either of those classes, but I
didn't look for very long.

I think that it probably does make sense to handle MADD specially for
Neoverse, and it would also probably be good to get Arm to fix it. I
think what we probably need is a suitable definition of MADD in
MacroAssembler.

Any heavy use of integer modulo should probably be referred back to the
application developers.

-- 
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