RFR: 8282365: Optimize divideUnsigned and remainderUnsigned for constants [v15]

Emanuel Peter epeter at openjdk.org
Fri Jun 30 10:11:06 UTC 2023


On Sat, 10 Jun 2023 01:25:55 GMT, Quan Anh Mai <qamai at openjdk.org> wrote:

>> Quan Anh Mai has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   whitespace
>
> May I have a second review for this patch, please?

@merykitty I'd love to review it sometime soon, I hope I get the time - though I'm soon off on vacation.

One question I have already: We only have tests for very few constant divisors. That makes me a bit nervous. It is hard to get these sorts of mathematical things implemented correctly. And reviewing is equally difficult. It would be nice to have more divisor constants. The best would be if we could randomly generate them. Can we maybe generate methods randomly with the jasm api, and throw in random divisor constants? What do you think?

And what do you suggest I read to understand the mathematical background, ie for determining the correct constants?

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

PR Comment: https://git.openjdk.org/jdk/pull/9947#issuecomment-1614436754


More information about the hotspot-compiler-dev mailing list