lkml.org 
[lkml]   [1996]   [Nov]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: IP Checksumming

    Richard B. Johnson writes:
    > > > Further, the present routines in ../../asm
    > > > don't take advantage of the Intel architecture.
    > >
    > > You mean the lodsw and loop instructions? Those have been losers
    > > since the 386.
    >
    > Not true. These built-in macros are responsible for much of the performance
    > improvements over chips such as the 68k providing the developer took the
    > time to use them.

    Have you actually read the timings? On the 486 and up, it's faster to
    do:

    move.b %al, (%edi)
    inc.l %edi

    than it is to do

    stos.b

    And you get to pick which index register you can use if you use the
    separate instructions, which is much better for register scheduling.

    The only time you _might_ win is if you use the repeated lods/stos/movs
    instructions for a large fill/copy. If you are using individual lods or
    stos instructions as part of a bigger loop you're slowing down your code.

    \
     
     \ /
      Last update: 2005-03-22 13:38    [W:8.040 / U:0.048 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site