Messages in this thread |  | | Date | Thu, 21 Nov 1996 09:14:05 -0800 | From | Steve VanDevender <> | Subject | Re: 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.
|  |