RFR: 8310813: Simplify and modernize equals, hashCode, and compareTo for BigInteger [v6]

Pavel Rappo prappo at openjdk.org
Thu Aug 10 11:52:58 UTC 2023


On Thu, 10 Aug 2023 11:28:39 GMT, Raffaello Giulietti <rgiulietti at openjdk.org> wrote:

>>> AFAIK, if you need reproducible randoms in tests, you should add the tags:
>>> 
>>> ```
>>>  * @key randomness
>>>  * @library /test/lib
>>> ```
>>> 
>>> and initialize your random generator with
>>> 
>>> ```
>>> import jdk.test.lib.RandomFactory;
>>> ...
>>> Random rnd = RandomFactory.getRandom();
>>> ```
>>> 
>>> This prints the seed to STDOUT.
>> 
>> It'd be applicable for tests, but not for benchmarks. Also, the point that @cl4es seems to make is that randomness is captured and set up to reduce noise, not to be able to reproduce "benchmark failures".
>
> My bad. Forget my note

> Some have a preference for providing a seed for `Random` instances in micros. Either hard-coded or through a `@Param` (I find this a bit excessive). Doing so might reduce run-to-run noise.

I hear you, but unless your opinion is strong, I'll leave it as is.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/14630#discussion_r1289994437


More information about the core-libs-dev mailing list