Re: 2.1.6 vs. 2.0.23

Robert Krawitz (
30 Oct 1996 02:17:48 GMT

In article <Pine.LNX.3.91.961030020537.17325E-100000@linux.cs.Helsinki.FI> Linus Torvalds <> writes:

Here it definitely looks like the effects of the pentium memcpy() code: the
file re-read speed of your 2.0.23 is better than on 2.1.6, and is actually
better than the libc bcopy.

I'd have expected the same thing in the pipe throughput too, but it
seems the overhead for context switching the FPU state might impact
the pipe throughput negatively (wild hand-waving here ;)

The Pentium memcpy code doesn't kick in until the amount copied is up
to 1K; my measurements suggest that it's actually a net win even at
512 bytes. What I suspect is happening is that the pipe buffers fit
in cache. On my system, the FPU does better than rep movsd when it's
in L2 cache, but not in L1. I have async cache; it's quite possible
that pipeline burst acts differently. Upshot: the FPU memcpy
generally does relatively poorly when the destination is already in
cache, since the FPU instructions are slow.

Robert Krawitz <> 

Member of the League for Programming Freedom -- mail Tall Clubs International -- or 1-800-521-2512