From ab6a873fe07b8ded403bc5a5ca73be5d04820d61 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Thu, 2 Jul 2009 03:39:03 -0700 Subject: SSSE3 strcpy/stpcpy for x86-64 This patch adds SSSE3 strcpy/stpcpy. I got up to 4X speed up on Core 2 and Core i7. I disabled it on Atom since SSSE3 version is slower for shorter (<64byte) data. --- string/strncpy.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'string/strncpy.c') diff --git a/string/strncpy.c b/string/strncpy.c index f32612e1cf..2274d7d31e 100644 --- a/string/strncpy.c +++ b/string/strncpy.c @@ -21,11 +21,12 @@ #undef strncpy +#ifndef STRNCPY +#define STRNCPY strncpy +#endif + char * -strncpy (s1, s2, n) - char *s1; - const char *s2; - size_t n; +STRNCPY (char *s1, const char *s2, size_t n) { reg_char c; char *s = s1; -- cgit v1.2.3