RFR: 8325438: Add exhaustive tests for Math.round intrinsics [v9]
Andrew Haley
aph at openjdk.org
Tue Apr 9 08:48:03 UTC 2024
On Fri, 5 Apr 2024 10:26:06 GMT, Hamlin Li <mli at openjdk.org> wrote:
>>> > There's no need for randomness or arrays or special values in the 32-bit case. You can, and should, test the entire 32-bit range in a few lines of code by using floatBitsToInt.
>>>
>>> In previous discussion, there are several reasons why it's implemented in this way:
>>>
>>> 1. test the whole range of 32 bits is slow, and even slow for a 64 ranges double.
>>
>> I guess we could try it for 32 bit floats. But it would take a while. If we can make sure it does not take much more than one minute, we can do that. But of course 64 bit doubles would be infeasible.
>
> As I remember, that's not the case in my local environment, i.e. it will take longer time.
If it takes longer than a few seconds, there's something wrong with your computer or your compiler. It's only 4G tests. I get
6,255.47 msec task-clock:u # 1.057 CPUs utilized
19,681,407,235 cycles:u # 3.146 GHz (95.55%)
110,397,691,854 instructions:u # 5.61 insn per cycle (95.55%)
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/17753#discussion_r1557235952
More information about the hotspot-compiler-dev
mailing list