RFR: 8257815: Replace global log2 functions with efficient implementations
Claes Redestad
redestad at openjdk.java.net
Tue Dec 8 15:23:13 UTC 2020
On Tue, 8 Dec 2020 14:49:09 GMT, Claes Redestad <redestad at openjdk.org> wrote:
>> Do you guys test on big endian? To be sure I'll run this through our landscape.
>
>> Do you guys test on big endian? To be sure I'll run this through our landscape.
>
> Some big endian testing would be much appreciated.
>
> I'm redesigning the `log2i` function based on Kim's feedback, which might hit a few road bumps so I'm pushing it through some local sanity testing. Hold on.
Revamped the non-exact variants as `ilog2` + `ilog2_graceful`. The former has `value > 0` as a precondition, the second accepts any value and is used when it's not obvious the input can be assumed to be a non-zero, positive value. I hope this is an acceptable compromise to reinstating the `log2_int`, `log2_long` etc variants.
I've gone through all usage to see if there are some additional places where we now need to use the graceful variant, and will do another pass later after I've rested my eyes and the changes have worked through a few tiers of testing.
-------------
PR: https://git.openjdk.java.net/jdk/pull/1663
More information about the hotspot-dev
mailing list