From e33e8c5d19f56e2c48f116c2e36e6e413e1d5fc5 Mon Sep 17 00:00:00 2001 From: dam Date: Sat, 1 Jul 2023 01:55:25 +0100 Subject: Use nsec instead of usec for performance calculation. --- Math_Test.jai | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'Math_Test.jai') diff --git a/Math_Test.jai b/Math_Test.jai index d216fd2..d03bd32 100644 --- a/Math_Test.jai +++ b/Math_Test.jai @@ -225,8 +225,8 @@ main :: () { for 0..DATA_SIZE-1 assert(numbers_zgen[it] == numbers_zasm[it]); - perf_gen := cast(float)DATA_SIZE/cast(float)to_microseconds(time_gen); - perf_asm := cast(float)DATA_SIZE/cast(float)to_microseconds(time_asm); + perf_gen := cast(float)DATA_SIZE/cast(float)to_nanoseconds(time_gen); + perf_asm := cast(float)DATA_SIZE/cast(float)to_nanoseconds(time_asm); best_gen = max(best_gen, perf_gen); best_asm = max(best_asm, perf_asm); } @@ -241,11 +241,11 @@ main :: () { ff := context.print_style.default_format_float; ff.zero_removal = .NO; ff.width = 7; - ff.trailing_width = 1; + ff.trailing_width = 3; context.print_style.default_format_float = ff; write_strings( - " | (ops / usec) |\n", + " | (ops / nsec) |\n", " | generic | x64 asm |\n" ); -- cgit v1.2.3