NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Testing memory performance



On Sun 18 Nov 2018 at 19:04:02 +0000, Sad Clouds wrote:
> Linux (gcc 6.3.0):

It looks to me like this fragment is not the whole function:

> Dump of assembler code for function memcpy:
> => 0x00007ffff78a0e90 <+0>:   mov    %rdi,%rax
>    0x00007ffff78a0e93 <+3>:   cmp    $0x10,%rdx
>    0x00007ffff78a0e97 <+7>:   jb     0x7ffff78a0f77

0x7ffff78a0f77 isn't in the disassembly

>    0x00007ffff78a0e9d <+13>:  cmp    $0x20,%rdx
>    0x00007ffff78a0ea1 <+17>:  ja     0x7ffff78a0fc6

0x7ffff78a0fc6 neither.

>    0x00007ffff78a0ea7 <+23>:  movups (%rsi),%xmm0
>    0x00007ffff78a0eaa <+26>:  movups -0x10(%rsi,%rdx,1),%xmm1
>    0x00007ffff78a0eaf <+31>:  movups %xmm0,(%rdi)
>    0x00007ffff78a0eb2 <+34>:  movups %xmm1,-0x10(%rdi,%rdx,1)
>    0x00007ffff78a0eb7 <+39>:  retq   
> End of assembler dump.

It looks like both functions check for some initial conditions to see
which optimized loop they can use, but they use very different
optimizations.

-Olaf.
-- 
___ Olaf 'Rhialto' Seibert  -- "What good is a Ring of Power
\X/ rhialto/at/falu.nl      -- if you're unable...to Speak." - Agent Elrond

Attachment: signature.asc
Description: PGP signature



Home | Main Index | Thread Index | Old Index