Foreign + Vectors - benchmarks for copying and swapping

Maurizio Cimadamore maurizio.cimadamore at oracle.com
Mon Jun 21 20:56:36 UTC 2021


On 21/06/2021 20:33, Paul Sandoz wrote:
> - Segment scalar access is penalized compared to ByteBuffer (from allocate or allocateDirect) scalar access.

Odd

We have many benchmarks similar to this (see LoopOverNonConstant) and 
they seem to offer same level of performance compared with ByteBuffers.

I wonder if the loop limit being "SPECIES.loopBound(srcArray.length)" 
plays a role? Have you tried replacing that expression with a constant?

Maurizio



More information about the panama-dev mailing list