aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdhemerval Zanella <azanella@linux.vnet.ibm.com>2013-08-29 15:38:51 -0300
committerAdhemerval Zanella <azanella@linux.vnet.ibm.com>2013-09-06 09:24:52 -0300
commite029e2e5c5448e9b32cc2f26c89968b61e0baa6c (patch)
tree4298cfeffa2c0c03a2550f3c4b30b21b7bcb00c1 /benchtests/bench-memchr.c
parentbenchtests/Makefile: Run benchmark for memcpy. (diff)
downloadglibc-e029e2e5c5448e9b32cc2f26c89968b61e0baa6c.tar.gz
glibc-e029e2e5c5448e9b32cc2f26c89968b61e0baa6c.tar.bz2
glibc-e029e2e5c5448e9b32cc2f26c89968b61e0baa6c.zip
benchtests: Add memrchr benchmark
Diffstat (limited to 'benchtests/bench-memchr.c')
-rw-r--r--benchtests/bench-memchr.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/benchtests/bench-memchr.c b/benchtests/bench-memchr.c
index db099ad543..30c472c131 100644
--- a/benchtests/bench-memchr.c
+++ b/benchtests/bench-memchr.c
@@ -16,9 +16,10 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
-#define TEST_MAIN
-#define TEST_NAME "memchr"
-#include "bench-string.h"
+#ifndef USE_AS_MEMRCHR
+# define TEST_MAIN
+# define TEST_NAME "memchr"
+# include "bench-string.h"
typedef char *(*proto_t) (const char *, int, size_t);
char *simple_memchr (const char *, int, size_t);
@@ -34,6 +35,7 @@ simple_memchr (const char *s, int c, size_t n)
return (char *) s - 1;
return NULL;
}
+#endif
static void
do_one_test (impl_t *impl, const char *s, int c, size_t n, char *exp_res)