time-to-botec

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

commit 2d4eea89563a8493ffbeb119254a70192677de08
parent 7be18ff7cba30d8fcc2b394f0d06927fffed470e
Author: NunoSempere <nuno.sempere@protonmail.com>
Date:   Mon, 29 May 2023 20:05:18 -0400

tweak: time-printing tweaks.

Diffstat:
MC-optimized/makefile | 2+-
MC-optimized/samples-one-thread.c | 2+-
MC-optimized/samples.c | 2+-
3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/C-optimized/makefile b/C-optimized/makefile @@ -39,7 +39,7 @@ format: $(SRC) $(FORMATTER) $(SRC) run: $(SRC) $(OUTPUT) - OMP_NUM_THREADS=1 ./$(OUTPUT) + OMP_NUM_THREADS=1 ./$(OUTPUT) && echo ./$(OUTPUT_ONE_THREAD) time: diff --git a/C-optimized/samples-one-thread.c b/C-optimized/samples-one-thread.c @@ -174,7 +174,7 @@ int main() // array_print(dist_mixture[0], N); // end = clock(); - // printf("Time (ms): %f\n", ((double)(end - start)) / (CLOCKS_PER_SEC * 10) * 1000); + // printf("Time (ms): %f\n", ((double)(end - start)) / (CLOCKS_PER_SEC * 1000)); // ^ Will only measure how long it takes the inner main to run, not the whole program, // including e.g., loading the program into memory or smth. // Also CLOCKS_PER_SEC in POSIX is a constant equal to 1000000. diff --git a/C-optimized/samples.c b/C-optimized/samples.c @@ -273,7 +273,7 @@ int main() split_array_free(dist_mixture, n_threads); // end = clock(); - // printf("Time (ms): %f\n", ((double)(end - start)) / (CLOCKS_PER_SEC * 10) * 1000); + // printf("Time (ms): %f\n", ((double)(end - start)) / (CLOCKS_PER_SEC) * 1000); // ^ Will only measure how long it takes the inner main to run, not the whole program, // including e.g., loading the program into memory or smth. // Also CLOCKS_PER_SEC in POSIX is a constant equal to 1000000.