Source-Changes archive

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

Re: CVS commit: src/sys/netipsec



David Laight <david%l8s.co.uk@localhost> writes:
> Indeed, on a modern x86 you do not want (ever) to execute movs{b,w,l}
> unless it is repeated AND the repeat count is considerable
> (unless you are optimising for space).
> 
> ISTR that something like:
> 1:    mov     (%esi,%ecx,4),%eax
>       mov     %eax,(%edi,%ecx,4)
>       dec     %ecx
>       jnc     1b
> is faster than 'rep movsw' for %ecx < (about) 16.

Are you including the overhead of calling the function?

In any case, it is possible to teach GCC to use different sequences
than the ones it uses right now.

Perry



Home | Main Index | Thread Index | Old Index