RFR: 8240829: Use a fast O(1) algorithm for exact_log2
Andrew Haley
aph at redhat.com
Tue Mar 10 18:14:39 UTC 2020
On 3/10/20 6:05 PM, Andrew Haley wrote:
> TL/DR: prefer portable code when possible.
And -- of course -- I never saw the count_leading_zeros() !
Why on Earth did anyone do all of the count_leading_zeros() work but
*not use it* in one of the hottest parts of HotSpot? Incredible.
It never even occurred to me that there might be definitions for
count_leading_zeros that were not used for exact_log2(). I just
saw it and thought "that's horrible."
--
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