]> git.ipfire.org Git - thirdparty/glibc.git/blobdiff - benchtests/bench-mempcpy.c
time/tst-strftime2.c: Make the file easier to maintain
[thirdparty/glibc.git] / benchtests / bench-mempcpy.c
index 82b276b8232cd140fb1603f9ab8ede27f30e72f8..09f8557413f92d95d25c6396e74e9a3bc14d73ff 100644 (file)
 #define TEST_NAME "mempcpy"
 #include "bench-string.h"
 
-char *simple_mempcpy (char *, const char *, size_t);
-
-IMPL (simple_mempcpy, 0)
-IMPL (mempcpy, 1)
-
 char *
-simple_mempcpy (char *dst, const char *src, size_t n)
+generic_mempcpy (char *dst, const char *src, size_t n)
 {
-  while (n--)
-    *dst++ = *src++;
-  return dst;
+  return memcpy (dst, src, n) + n;
 }
 
+IMPL (mempcpy, 1)
+IMPL (generic_mempcpy, 0)
+
 #include "bench-memcpy.c"