diff --git a/bench.odin b/bench.odin deleted file mode 100644 index aab09bbfe..000000000 --- a/bench.odin +++ /dev/null @@ -1,69 +0,0 @@ -package bench - -import "core:slice" -import "core:math/rand" -import "core:time" -import "core:fmt" - -T :: u64 - -benchmark_sort :: proc(num: int) -> f64 { - data := make([]T, num) - defer delete(data) - for &x in data { - x = T(rand.uint64()) - } - - start := time.tick_now() - - slice.sort(data) - - return time.duration_milliseconds(time.tick_since(start)) -} - -benchmark_sort_with_indices :: proc(num: int) -> f64 { - data := make([]T, num) - defer delete(data) - for &x in data { - x = T(rand.uint64()) - } - - start := time.tick_now() - - // Important: includes 'sort_from_permutation_indices' - indices := slice.sort_with_indices(data) - - return time.duration_milliseconds(time.tick_since(start)) -} - -benchmark_proc :: proc(num: int, bench: proc(int) -> f64, expr := #caller_expression(bench)) { - - ITERS :: 10 - min_dur := max(f64) - max_dur := min(f64) - sum_dur: f64 - for i in 0..