|
@@ -54,14 +54,15 @@ run_trial_size :: proc(p: proc "contextless" ([]u8, byte) -> int, size: int, idx
|
|
|
|
|
|
accumulator: int
|
|
accumulator: int
|
|
|
|
|
|
|
|
+ watch: time.Stopwatch
|
|
|
|
+
|
|
|
|
+ time.stopwatch_start(&watch)
|
|
for _ in 0..<runs {
|
|
for _ in 0..<runs {
|
|
- start := time.now()
|
|
|
|
accumulator += p(data, 'z')
|
|
accumulator += p(data, 'z')
|
|
- done := time.since(start)
|
|
|
|
- timing += done
|
|
|
|
}
|
|
}
|
|
|
|
+ time.stopwatch_stop(&watch)
|
|
|
|
|
|
- timing /= time.Duration(runs)
|
|
|
|
|
|
+ timing = time.stopwatch_duration(watch)
|
|
|
|
|
|
log.debug(accumulator)
|
|
log.debug(accumulator)
|
|
return
|
|
return
|