Re: Speed of memcpy, csum_partial and csum_partial_copy

Robert L Krawitz (rlk@tiac.net)
Sun, 9 Jun 1996 11:51:10 -0400


Date: Sun, 9 Jun 1996 09:03:22 +0300 (EET DST)
From: Linus Torvalds <torvalds@cs.Helsinki.FI>

On Sat, 8 Jun 1996, Robert L Krawitz wrote:
>
> 643 23.78% 00191324 csum_partial_copy_fromuser
> 997 36.88% 001369c8 memcpy_toiovec
> 2703 100.00% 00000000 total
>
> That's very, very interesting. Somehow the checksum routine was
> faster than the raw memcpy routine.

Yes. But there could be secondary stuff here that doesn't show up, like
the block being in the cache before entering the system call, but the TCP
processing fliushing the cache enough that by the time we copy it out to
user space we have nothing cached any more..

True. And I believe that that accounds for your 20 MB/sec figure below.

I actually get closer to 20MB/s over TCP loopback. It's EDO RAM and sync
burst cache etc. 20MB/s over TCP isn't bad on a machine that does memcpy
at 43MB/s..

You should try the FPU memcpy one of these days (from my web page).
I'm very curious as to what it does on EDO.

-- 
Robert Krawitz <rlk@tiac.net>           http://www.tiac.net/users/rlk/

Member of the League for Programming Freedom -- mail lpf@uunet.uu.net Tall Clubs International -- tci-request@aptinc.com or 1-800-521-2512