Re: Memcopy by 8?

Pavel Machek (pavel@bug.ucw.cz)
Sun, 16 May 1999 21:52:09 +0200


Hi!

> OK, here's my ideas for an optimization: in string-486.h in 2.2.8, the
> memcpy function is either implemented into 3 separate functions: memcopy
> by 4, 2, and 1 bytes. For this purpose, the number of bytes to be copied
> is %ed by 4 and 2. I have two optimizations in mind:
> 1: Implement a memcpy by 8 for MMX machines that would use the MOVQ
> command and an MMX register, and an analogous command on non-MMX
> machines (for consistency) that would use a doubled long move.

...but touching MMX register means that you've trashed MMX/FPU state
which means you have to do MMX/FPU state save/restore. That's
expensive. The patch HAS been written before.

Pavel

-- 
I'm really pavel@ucw.cz. Look at http://195.113.31.123/~pavel.          Pavel
Hi! I'm a .signature virus! Copy me into your ~/.signature to help me spread!

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/