From 0543ee917b893903c30f54b063648b0064ded31e Mon Sep 17 00:00:00 2001 From: Scott McKendry <39483124+scottmckendry@users.noreply.github.com> Date: Sun, 8 Dec 2024 18:36:40 +1300 Subject: [PATCH] run slow solutions once only --- 2024/utils/utils.odin | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/2024/utils/utils.odin b/2024/utils/utils.odin index d94bca7..6217bbe 100644 --- a/2024/utils/utils.odin +++ b/2024/utils/utils.odin @@ -58,13 +58,19 @@ get_solution_stats :: proc(solutions: map[string]proc()) -> []solution_stat { i_stat += 1 } + run_once := []string{"06P2:Guard Gallivant"} + slice.sort(ordered_keys) for key, i in ordered_keys { solution := solutions[key] sum_ex_time := time.Duration(0) - for j := 0; j < 10; j += 1 { + if slice.contains(run_once, key) { sum_ex_time += benchmark(solution) + } else { + for j := 0; j < 10; j += 1 { + sum_ex_time += benchmark(solution) + } } stats[i] = solution_stat {