include makefile.conf later, reset_timer in strstr bench
authornsz <nsz@port70.net>
Mon, 8 Aug 2011 16:35:31 +0000 (18:35 +0200)
committernsz <nsz@port70.net>
Mon, 8 Aug 2011 16:35:31 +0000 (18:35 +0200)
Makefile.inc
src/string/bench.c

index f163fda..ae2fa3f 100644 (file)
@@ -14,7 +14,6 @@ usemusl = yes
 prefix = /usr/local/musl
 includedir = $(prefix)/include
 libdir = $(prefix)/lib
--include $(ROOTDIR)/Makefile.conf
 
 AR=ar
 RANLIB=ranlib
@@ -23,6 +22,8 @@ CFLAGS += -g -D_POSIX_C_SOURCE=200809L -std=c99 -pipe -Wall
 LDFLAGS += -g -lpthread -lrt -lm
 INC += -I$(ROOTDIR)/common
 
+-include $(ROOTDIR)/Makefile.conf
+
 ifeq ($(usemusl), yes)
 CC=gcc
 LIBCC=$(shell gcc -print-file-name=libgcc.a |sed 's,/libgcc.a,,')
index fcfc1e9..9f0a7f5 100644 (file)
@@ -17,6 +17,7 @@ static int bstrstr(int N, const char *needle) {
                haystack[l*i+l-1] ^= 1;
        }
        memcpy(haystack + l*i, needle, l+1);
+       reset_timer();
        for (i=0; i<N; i++) {
                haystack[0]^=1;
                cs += (int)strstr(haystack, needle);