diff --git a/benchtests/bench-stpcpy.c b/benchtests/bench-stpcpy.c
index 77ffb0f5c22b8d8ba83d46e903a23c90d8c983c1..7982c1886bb0af680b00757d8383b2ef84503533 100644
--- a/benchtests/bench-stpcpy.c
+++ b/benchtests/bench-stpcpy.c
@@ -24,22 +24,15 @@
Â # define TEST_NAME "wcpcpy"
Â #endif /* WIDE */
Â #include "bench-string.h"
-#ifndef WIDE
-# define SIMPLE_STPCPY simple_stpcpy
-#else
-# define SIMPLE_STPCPY simple_wcpcpy
-#endif /* WIDE */
-
-CHAR *SIMPLE_STPCPY (CHAR *, const CHAR *);
-
-IMPL (SIMPLE_STPCPY, 0)
-IMPL (STPCPY, 1)
Â 
Â CHAR *
-SIMPLE_STPCPY (CHAR *dst, const CHAR *src)
+generic_stpcpy (CHAR *dst, const CHAR *src)
Â {
-Â  while ((*dst++ = *src++) != '\0');
-Â  return dst - 1;
+Â  size_t len = STRLEN (src);
+Â  return (CHAR*)MEMCPY (dst, src, len + 1) + len;
Â }
Â 
+IMPL (STPCPY, 1)
+IMPL (generic_stpcpy, 0)
+
Â #include "bench-strcpy.c"
diff --git a/benchtests/bench-stpncpy.c b/benchtests/bench-stpncpy.c
index 40c82cf716e6d7bc8fcb8d5a390da1ee8fee3245..331f5e67b7fc054bd678dbd264a24e43f940c0ed 100644
--- a/benchtests/bench-stpncpy.c
+++ b/benchtests/bench-stpncpy.c
@@ -24,47 +24,19 @@
Â # define TEST_NAME "wcpncpy"
Â #endif /* WIDE */
Â #include "bench-string.h"
-#ifndef WIDE
-# define SIMPLE_STPNCPY simple_stpncpy
-# define STUPID_STPNCPY stupid_stpncpy
-#else
-# define SIMPLE_STPNCPY simple_wcpncpy
-# define STUPID_STPNCPY stupid_wcpncpy
-#endif /* WIDE */
-
-CHAR *SIMPLE_STPNCPY (CHAR *, const CHAR *, size_t);
-CHAR *STUPID_STPNCPY (CHAR *, const CHAR *, size_t);
-
-IMPL (STUPID_STPNCPY, 0)
-IMPL (SIMPLE_STPNCPY, 0)
-IMPL (STPNCPY, 1)
-
-CHAR *
-SIMPLE_STPNCPY (CHAR *dst, const CHAR *src, size_t n)
-{
-Â  while (n--)
-Â Â Â  if ((*dst++ = *src++) == '\0')
-Â Â Â Â Â  {
-Â Â Â Â Â Â  size_t i;
-
-Â Â Â Â Â Â  for (i = 0; i < n; ++i)
-Â Â Â Â Â Â Â Â  dst[i] = '\0';
-Â Â Â Â Â Â  return dst - 1;
-Â Â Â Â Â  }
-Â  return dst;
-}
Â 
Â CHAR *
-STUPID_STPNCPY (CHAR *dst, const CHAR *src, size_t n)
+generic_stpncpy (CHAR *dst, const CHAR *src, size_t n)
Â {
Â Â  size_t nc = STRNLEN (src, n);
-Â  size_t i;
-
-Â  for (i = 0; i < nc; ++i)
-Â Â Â  dst[i] = src[i];
-Â  for (; i < n; ++i)
-Â Â Â  dst[i] = '\0';
-Â  return dst + nc;
+Â  MEMCPY (dst, src, nc);
+Â  dst += nc;
+Â  if (nc == n)
+Â Â Â  return dst;
+Â  return MEMSET (dst, 0, n - nc);
Â }
Â 
+IMPL (STPNCPY, 1)
+IMPL (generic_stpncpy, 0)
+
Â #include "bench-strncpy.c"
diff --git a/benchtests/bench-strcat.c b/benchtests/bench-strcat.c
index 6b3b084ae19a931cb2bda07794380b5745ccfc86..d3e96f4ec6331bea0027016eb6af4a276d0e6714 100644
--- a/benchtests/bench-strcat.c
+++ b/benchtests/bench-strcat.c
@@ -28,31 +28,25 @@
Â 
Â #ifndef WIDE
Â # define sfmt "s"
-# define SIMPLE_STRCAT simple_strcat
Â # define SMALL_CHAR 127
Â #else
Â # define sfmt "ls"
-# define SIMPLE_STRCAT simple_wcscat
Â # define SMALL_CHAR 1273
Â #endif /* WIDE */
Â 
Â 
Â typedef CHAR *(*proto_t) (CHAR *, const CHAR *);
-CHAR *SIMPLE_STRCAT (CHAR *, const CHAR *);
-
-IMPL (SIMPLE_STRCAT, 0)
-IMPL (STRCAT, 1)
Â 
Â CHAR *
-SIMPLE_STRCAT (CHAR *dst, const CHAR *src)
+generic_strcat (CHAR *dst, const CHAR *src)
Â {
-Â  CHAR *ret = dst;
-Â  while (*dst++ != '\0');
-Â  --dst;
-Â  while ((*dst++ = *src++) != '\0');
-Â  return ret;
+Â  STRCPY (dst + STRLEN (dst), src);
+Â  return dst;
Â }
Â 
+IMPL (STRCAT, 1)
+IMPL (generic_strcat, 0)
+
Â static void
Â do_one_test (impl_t *impl, CHAR *dst, const CHAR *src)
Â {
diff --git a/benchtests/bench-strcpy.c b/benchtests/bench-strcpy.c
index e5fd27ffba9ca6dd871e658d1cffc22f28047e49..426ee8f79ad8400b5ceddad5d6cdfc3523f49f16 100644
--- a/benchtests/bench-strcpy.c
+++ b/benchtests/bench-strcpy.c
@@ -34,25 +34,17 @@
Â # else
Â #Â  define TEST_NAME "wcscpy"
Â # endif
-# include "bench-string.h"
-# ifndef WIDE
-#Â  define SIMPLE_STRCPY simple_strcpy
-# else
-#Â  define SIMPLE_STRCPY simple_wcscpy
-# endif
-
-CHAR *SIMPLE_STRCPY (CHAR *, const CHAR *);
-
-IMPL (SIMPLE_STRCPY, 0)
-IMPL (STRCPY, 1)
+#include "bench-string.h"
Â 
Â CHAR *
-SIMPLE_STRCPY (CHAR *dst, const CHAR *src)
+generic_strcpy (CHAR *dst, const CHAR *src)
Â {
-Â  CHAR *ret = dst;
-Â  while ((*dst++ = *src++) != '\0');
-Â  return ret;
+Â  return MEMCPY (dst, src, STRLEN (src) + 1);
Â }
+
+IMPL (STRCPY, 1)
+IMPL (generic_strcpy, 0)
+
Â #endif
Â 
Â typedef CHAR *(*proto_t) (CHAR *, const CHAR *);
diff --git a/benchtests/bench-strncat.c b/benchtests/bench-strncat.c
index 7e0112273ba0727ae29407e38724c39159ce1c93..da8318e9a24e50ca491b65e092cc5152b3c47715 100644
--- a/benchtests/bench-strncat.c
+++ b/benchtests/bench-strncat.c
@@ -27,35 +27,26 @@
Â #define BIG_CHAR MAX_CHAR
Â 
Â #ifndef WIDE
-# define SIMPLE_STRNCAT simple_strncat
-# define STUPID_STRNCAT stupid_strncat
Â # define SMALL_CHAR 127
Â #else
-# define SIMPLE_STRNCAT simple_wcsncat
-# define STUPID_STRNCAT stupid_wcsncat
Â # define SMALL_CHAR 1273
Â #endif /* WIDE */
Â 
Â typedef CHAR *(*proto_t) (CHAR *, const CHAR *, size_t);
-CHAR *STUPID_STRNCAT (CHAR *, const CHAR *, size_t);
-CHAR *SIMPLE_STRNCAT (CHAR *, const CHAR *, size_t);
-
-IMPL (STUPID_STRNCAT, 0)
-IMPL (STRNCAT, 2)
Â 
Â CHAR *
-STUPID_STRNCAT (CHAR *dst, const CHAR *src, size_t n)
+generic_strncat (CHAR *dst, const CHAR *src, size_t n)
Â {
-Â  CHAR *ret = dst;
-Â  while (*dst++ != '\0');
-Â  --dst;
-Â  while (n--)
-Â Â Â  if ((*dst++ = *src++) == '\0')
-Â Â Â Â Â  return ret;
-Â  *dst = '\0';
-Â  return ret;
+Â  CHAR *end = dst + STRLEN (dst);
+Â  n = STRNLEN (src, n);
+Â  end[n] = 0;
+Â  MEMCPY (end, src, n);
+Â  return dst;
Â }
Â 
+IMPL (STRNCAT, 2)
+IMPL (generic_strncat, 0)
+
Â static void
Â do_one_test (impl_t *impl, CHAR *dst, const CHAR *src, size_t n)
Â {
diff --git a/benchtests/bench-strncpy.c b/benchtests/bench-strncpy.c
index 79953759bfbd7201b9e3a846b59666375cb76348..e32a1519cd95af5456277e765813eb78211a3a2a 100644
--- a/benchtests/bench-strncpy.c
+++ b/benchtests/bench-strncpy.c
@@ -33,47 +33,19 @@
Â #Â  define TEST_NAME "wcsncpy"
Â # endif /* WIDE */
Â # include "bench-string.h"
-# ifndef WIDE
-#Â  define SIMPLE_STRNCPY simple_strncpy
-#Â  define STUPID_STRNCPY stupid_strncpy
-# else
-#Â  define SIMPLE_STRNCPY simple_wcsncpy
-#Â  define STUPID_STRNCPY stupid_wcsncpy
-# endif /* WIDE */
-
-CHAR *SIMPLE_STRNCPY (CHAR *, const CHAR *, size_t);
-CHAR *STUPID_STRNCPY (CHAR *, const CHAR *, size_t);
-
-IMPL (STUPID_STRNCPY, 0)
-IMPL (SIMPLE_STRNCPY, 0)
-IMPL (STRNCPY, 1)
Â 
Â CHAR *
-SIMPLE_STRNCPY (CHAR *dst, const CHAR *src, size_t n)
+generic_strncpy (CHAR *dst, const CHAR *src, size_t n)
Â {
-Â  CHAR *ret = dst;
-Â  while (n--)
-Â Â Â  if ((*dst++ = *src++) == '\0')
-Â Â Â Â Â  {
-Â Â Â Â Â Â  while (n--)
-Â Â Â Â Â Â Â Â  *dst++ = '\0';
-Â Â Â Â Â Â  return ret;
-Â Â Â Â Â  }
-Â  return ret;
+Â  size_t nc = STRNLEN (src, n);
+Â  if (nc != n)
+Â Â Â  MEMSET (dst + nc, 0, n - nc);
+Â  return MEMCPY (dst, src, nc);
Â }
Â 
-CHAR *
-STUPID_STRNCPY (CHAR *dst, const CHAR *src, size_t n)
-{
-Â  size_t nc = STRNLEN (src, n);
-Â  size_t i;
+IMPL (STRNCPY, 1)
+IMPL (generic_strncpy, 0)
Â 
-Â  for (i = 0; i < nc; ++i)
-Â Â Â  dst[i] = src[i];
-Â  for (; i < n; ++i)
-Â Â Â  dst[i] = '\0';
-Â  return dst;
-}
Â #endif /* !STRNCPY_RESULT */
Â 
Â typedef CHAR *(*proto_t) (CHAR *, const CHAR *, size_t);
diff --git a/benchtests/bench-strnlen.c b/benchtests/bench-strnlen.c
index 8a7641669a36603e3943b5ca3b9cb0f648dd18f0..8a0fabfcf6c4223dceab3a8eb581851c6ab6be5d 100644
--- a/benchtests/bench-strnlen.c
+++ b/benchtests/bench-strnlen.c
@@ -28,27 +28,24 @@
Â 
Â #ifndef WIDE
Â # define MIDDLE_CHAR 127
-# define SIMPLE_STRNLEN simple_strnlen
Â #else
Â # define MIDDLE_CHAR 1121
-# define SIMPLE_STRNLEN simple_wcsnlen
Â #endif /* WIDE */
Â 
Â typedef size_t (*proto_t) (const CHAR *, size_t);
-size_t SIMPLE_STRNLEN (const CHAR *, size_t);
-
-IMPL (SIMPLE_STRNLEN, 0)
-IMPL (STRNLEN, 1)
+size_t generic_strnlen (const CHAR *, size_t);
Â 
Â size_t
-SIMPLE_STRNLEN (const CHAR *s, size_t maxlen)
+memchr_strnlen (const CHAR *s, size_t maxlen)
Â {
-Â  size_t i;
-
-Â  for (i = 0; i < maxlen && s[i]; ++i);
-Â  return i;
+Â  const CHAR *s1 = MEMCHR (s, 0, maxlen);
+Â  return (s1 == NULL) ? maxlen : s1 - s;
Â }
Â 
+IMPL (STRNLEN, 1)
+IMPL (memchr_strnlen, 0)
+IMPL (generic_strnlen, 0)
+
Â static void
Â do_one_test (impl_t *impl, const CHAR *s, size_t maxlen, size_t exp_len)
Â {
@@ -146,3 +143,13 @@ test_main (void)
Â }
Â 
Â #include <support/test-driver.c>
+
+#define libc_hidden_def(X)
+#ifndef WIDE
+# undef STRNLEN
+# define STRNLEN generic_strnlen
+# include <string/strnlen.c>
+#else
+# define WCSNLEN generic_strnlen
+# include <wcsmbs/wcsnlen.c>
+#endif
