parent
611ef8d124
commit
fe0357b5d5
6
Makefile
6
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
|
||||
|
3
bench.py
3
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***")
|
||||
|
Loading…
Reference in New Issue
Block a user