RFR: 8338967: Improve performance for MemorySegment::fill [v10]
Per Minborg
pminborg at openjdk.org
Tue Sep 3 10:28:26 UTC 2024
On Tue, 3 Sep 2024 08:49:58 GMT, Francesco Nigro <duke at openjdk.org> wrote:
>> I've tried
>>
>>
>> final long longValue = Byte.toUnsignedLong(value) * 0x0101010101010101L;
>>
>>
>> But it had the same performance as explicit bit shifting on M1.
>
> @minborg the ` ELEM_SIZE` is a `Param` field right? Just to be 100% sure of it...
yes it is. But I think the reason we are not seeing any difference is that in the fill benchmarks, we are always using a value of zero. We should keep this trick in mind for later...
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/20712#discussion_r1741814268
More information about the core-libs-dev
mailing list