On Thu, 18 Jul 2024 15:27:53 GMT, Raffaello Giulietti <rgiulie...@openjdk.org> wrote:
> Experimentally, the following seems a bit faster. In some cases, it avoids a > full multiplication, some updates, and has one less test. I hope it is > correct as well ;-) It's a nice code, but I'm afraid that if `s == LONG_MASK` and `Long.compareUnsigned(x, s * s) >= 0`, the overflow check is unavoidable... ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/19710#discussion_r1683093419