Performance of memory var handles in hot loops
Vladimir Ivanov
vladimir.x.ivanov at oracle.com
Tue Apr 7 13:54:37 UTC 2020
Thanks for the feedback, Antoine!
I just briefly looked through the benchmark yet, but the first question
is: have you considered using indexed memory accessors instead of
MemoryAddress::addOffset()?
Best regards,
Vladimir Ivanov
On 07.04.2020 14:57, Antoine Chambille wrote:
> @Benchmark
> public void scalarSegment(Data state) {
> final MemoryAddress ia = state.inputMA;
> final MemoryAddress oa = state.outputMA;
> for(int i = 0; i < SIZE; i++) {
> MH.set(oa.addOffset(8*i),
> (double) MH.get(ia.addOffset(8*i)) +
> (double) MH.get(oa.addOffset(8*i)));
> }
> }
More information about the panama-dev
mailing list