lkml.org 
[lkml]   [1998]   [Apr]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: faster strcpy()
   Date: 	Sun, 26 Apr 1998 14:48:02 -0700 (PDT)
From: Dean Gaudet <dgaudet-list-linux-kernel@arctic.org>

Which of course can't be used at all on SMP boxes; and I even have
doubts about its performance on a UP box when you've got more than
one task going. strcpy() is not an uncommon routine, if all the
processes on a box were using the FPU to do strcpy() it probably
won't be a pretty thing -- every context switch would require FPU
switching as well.

For some things on some architectures, the performance gain from FPU
based memcpy/csum_copy/etc. are so large that we even do it in the
kernel on sparc64.

The trick is to have a heuristic which decides whether the cost of
(possible) extra FPU saves/restores overcomes the gain in performance
from the FPU version of the code. This heuristic is available always
for the memcpy/csum_copy cases, but it isn't (and would almost never
be met in any event) for the str{n}cpy() cases.

Later,
David S. Miller
davem@dm.cobaltmicro.com

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu

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