[foreign-memaccess+abi] RFR: Improve performance of Arena::allocateFrom [v2]

Sebastian Stenzel duke at openjdk.org
Sat Aug 5 14:25:51 UTC 2023


On Fri, 4 Aug 2023 13:13:36 GMT, Jorn Vernee <jvernee at openjdk.org> wrote:

>> Maurizio Cimadamore has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Fix segment allocator test
>
> test/micro/org/openjdk/bench/java/lang/foreign/AllocFromTest.java line 67:
> 
>> 65:     public void setup() {
>> 66:         arr = new byte[size];
>> 67:         Random random = new Random();
> 
> Please use an explicit seed here (e.g. `0`), so that the data is always the same between benchmark runs.

Shouldn't we also explicitly choose the RNG algorithm via `RandomGenerator.of("...").create(0L)` to track regressions, should the default algorithm ever change?

Or are tests only required to be reproducible within the same JDK?

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

PR Review Comment: https://git.openjdk.org/panama-foreign/pull/855#discussion_r1285065783


More information about the panama-dev mailing list