time-to-botec

Benchmark sampling in different programming languages
Log | Files | Refs | README

commit e2558b05ba7de293a10d035fecb7b80cc3b601b6
parent 2d4eea89563a8493ffbeb119254a70192677de08
Author: NunoSempere <nuno.sempere@protonmail.com>
Date:   Tue, 30 May 2023 13:01:31 -0400

clearly signal what makefile commands are linux only.

Diffstat:
MC-optimized/makefile | 11+++++++++--
MREADME.md | 2+-
2 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/C-optimized/makefile b/C-optimized/makefile @@ -42,11 +42,18 @@ run: $(SRC) $(OUTPUT) OMP_NUM_THREADS=1 ./$(OUTPUT) && echo ./$(OUTPUT_ONE_THREAD) -time: +multi: + OMP_NUM_THREADS=1 ./$(OUTPUT) && echo + OMP_NUM_THREADS=2 ./$(OUTPUT) && echo + OMP_NUM_THREADS=4 ./$(OUTPUT) && echo + ./$(OUTPUT_ONE_THREAD) && echo + +time-linux: + echo "Requires /bin/time, found on GNU/Linux systems" && echo OMP_NUM_THREADS=1 /bin/time -f "Time: %es" ./$(OUTPUT) && echo OMP_NUM_THREADS=2 /bin/time -f "Time: %es" ./$(OUTPUT) && echo OMP_NUM_THREADS=4 /bin/time -f "Time: %es" ./$(OUTPUT) && echo /bin/time -f "Time: %es" ./$(OUTPUT_ONE_THREAD) && echo -linux-install: +debian-install-dependencies: sudo apt-get install libomp-dev diff --git a/README.md b/README.md @@ -31,7 +31,7 @@ As of now, it may be useful for checking the validity of simple estimations. The | Language | Time | Lines of code | |--------------------------|-----------|---------------| -| C (optimized, 1 thread) | ~30ms | 183 | +| C (optimized, 1 thread) | 30ms | 183 | | Nim | 68ms | 84 | | C | 292ms | 149 | | Javascript (NodeJS) | 732ms | 69 |