diff --git a/Makefile b/Makefile index fbc3bbd..0577c55 100644 --- a/Makefile +++ b/Makefile @@ -1,12 +1,16 @@ CC = gcc CFLAGS = -Ofast -all: build run valgrind build_risspam run_risspam build_cpp build_borded_cpp +all: build run valgrind build_risspam run_risspam build_cpp build_borded_cpp build_py build: @echo "Compiling retoor_c project.". @$(CC) $(CFLAGS) retoor_c/isspam.c -o isspam +build_py: + @echo "Copying py file" + @cp retoor_c/isspam.py isspam.py + build_cpp: @echo "Compiling C++ version of isspam." @g++ -Ofast retoor_c/isspam.cpp -o isspam_cpp diff --git a/bench.py b/bench.py index 5ada2fc..64ca6fb 100644 --- a/bench.py +++ b/bench.py @@ -14,4 +14,7 @@ print("Time CPP:",time.time() - time_start) time_start = time.time() subprocess.check_output('./borded_cpp_exec books/*.txt', shell=True) print("Time Borded CPP:",time.time() - time_start) +time_start = time.time() +subprocess.check_output('python3 isspam.py books/*.txt', shell=True) +print("Time Retoor Python:",time.time() - time_start) print("***end benchmark***")