RFR: 8315098: Improve URLEncodeDecode microbenchmark [v3]
Claes Redestad
redestad at openjdk.org
Wed Aug 30 15:46:13 UTC 2023
On Wed, 30 Aug 2023 15:33:01 GMT, Francesco Nigro <duke at openjdk.org> wrote:
>> Claes Redestad has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Print out distribution of generated strings, improve precision at extremes (short strings, very low percentages), fix issue with decodable not getting the expected distribution
>
> test/micro/org/openjdk/bench/java/net/URLEncodeDecode.java line 86:
>
>> 84: tokens[n++] = '*';
>> 85:
>> 86: Random r = new Random(mySeed);
>
> SplittableRandom allow to have perfectly reproducible sequences
Care to elaborate? `Random` with an explicit seed should be more than enough to have perfectly reproducible sequences for our case (`SplittableRandom` uses a different algorithm by default with a longer period, but I can't see how this'd be relevant to this case.)
* If two instances of {@code Random} are created with the same
* seed, and the same sequence of method calls is made for each, they
* will generate and return identical sequences of numbers.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/15448#discussion_r1310479054
More information about the net-dev
mailing list