Update benchmark: run each bench separetely to avoid bad malloc implementation bug
(Running list benchmark before array fragment the memory too much and generate a noticable slow down). Add Klib bench. o
This commit is contained in:
1 parent
cfe79fbc01
commit
e314f7c272
4 files changed
+204
-15
No files matched your search
+18
-4
@@ -3,15 +3,29 @@ CXX=c++ -std=c++11
|
||||
CFLAGS=-O2 -march=native -Wall
|
||||
CPPFLAGS=-I..
|
||||
|
||||
all: bench-mlib bench-stl
|
||||
all: bench-mlib bench-stl bench-klib
|
||||
|
||||
bench-mlib:
|
||||
$(CC) $(CFLAGS) $(CPPFLAGS) bench-mlib.c -o bench-mlib.exe
|
||||
./bench-mlib.exe
|
||||
@./bench-mlib.exe 1
|
||||
@./bench-mlib.exe 2
|
||||
@./bench-mlib.exe 3
|
||||
@./bench-mlib.exe 4
|
||||
|
||||
bench-stl:
|
||||
$(CXX) $(CFLAGS) $(CPPFLAGS) bench-stl.cpp -o bench-stl.exe
|
||||
./bench-stl.exe
|
||||
@./bench-stl.exe 1
|
||||
@./bench-stl.exe 2
|
||||
@./bench-stl.exe 3
|
||||
@./bench-stl.exe 4
|
||||
@./bench-stl.exe 5
|
||||
|
||||
bench-klib:
|
||||
$(CC) $(CFLAGS) $(CPPFLAGS) $${KLIB_CPPFLAGS} bench-klib.c -o bench-klib.exe
|
||||
@./bench-klib.exe 1
|
||||
@./bench-klib.exe 2
|
||||
@./bench-klib.exe 3
|
||||
@./bench-klib.exe 4
|
||||
|
||||
clean:
|
||||
rm -f *.o bench-mlib.exe bench-stl.exe *~
|
||||
rm -f *.o bench-*.exe *~
|
||||
Reference in new issue
Block a user