lkml.org 
[lkml]   [1999]   [May]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Memcopy by 8?
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/

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