On Fri, 13 Sep 2024 18:56:35 GMT, Raffaello Giulietti <rgiulie...@openjdk.org> 
wrote:

> I considered using `powerOfTwoD` but it uses a `long` `+`, and performs an 
> additional masking which seems useless or over-cautious and does not help if 
> `n` is out of range (assuming the assert is not enabled).
> 
> What about a `private` similar method that just does the bare minimum and 
> which could also be invoked by `powerOfTwoD`?

Sure; having a raw "powerOfTwo0" that didn't do any checks, etc. as a kernel 
operation sounds fine.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/20948#discussion_r1759342756

Reply via email to