3 ms·
The performance is the same because the core loop in both cases is identical: loop: vaddsd (%rcx), %xmm0, %xmm0 addq $8, %rcx addq
by StefanKarpinski 9y ago
The performance is the same because the core loop in both cases is identical:
loop:
vaddsd (%rcx), %xmm0, %xmm0
addq $8, %rcx
addq $-1, %rax
jne loop
There's more setup required for offset arrays, but otherwise there's no difference. I'm not sure why arrays having an offset would be any more work: array indexing in general involves adding an index to a base pointer; having an offset effectively just changes what the base pointer value is.