RFR: 8257815: Replace global log2 functions with efficient implementations

Claes Redestad redestad at openjdk.java.net
Tue Dec 8 19:34:39 UTC 2020


On Tue, 8 Dec 2020 17:16:30 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:

>> I'm not sure about the ilog2 name.
>> 1) If it's commonly used elsewhere then we're begging for a name clashes.
>> 2) I don't like the discoverability of that name. If I write code where I need log2 then I'll look for functions named log2* not *log2. I know that's already a problem with exact_log2, but maybe that function also could be renamed?
>> 
>> These are not hard objects, but maybe others agree?
>
>> I'm not sure about the ilog2 name.
>> 
>> 1. If it's commonly used elsewhere then we're begging for a name clashes.
>> 2. I don't like the discoverability of that name. If I write code where I need log2 then I'll look for functions named log2* not *log2. I know that's already a problem with exact_log2, but maybe that function also could be renamed?
>> 
>> These are not hard objects, but maybe others agree?
> 
> I agree (including renaming exact_log2).

So how about:
log2i
log2i_exact
log2i_graceful
I'm not married to the `log2i_graceful`, but with a goal to get rid of it maybe that's ok?

-------------

PR: https://git.openjdk.java.net/jdk/pull/1663


More information about the hotspot-dev mailing list