Skip to content

Commit

Permalink
run slow solutions once only
Browse files Browse the repository at this point in the history
  • Loading branch information
scottmckendry committed Dec 8, 2024
1 parent aa21b4e commit 0543ee9
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion 2024/utils/utils.odin
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 0543ee9

Please sign in to comment.