Skip to content

Commit

Permalink
fixup! bench_frac_div: Benchmark for different scaling methods
Browse files Browse the repository at this point in the history
  • Loading branch information
Joakim Nohlgård committed Sep 5, 2018
1 parent 2ea5f4f commit 200cc5c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/bench_frac_div/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -157,12 +157,14 @@ int main(void)
fill_buf(buf, ARRAY_LEN(buf), seed);
time_divide = bench_divide(buf, ARRAY_LEN(buf), var, 1000000ul);
fill_buf(buf, ARRAY_LEN(buf), seed);
time_divide = bench_double(buf, ARRAY_LEN(buf), var, 1000000ul);
time_double = bench_double(buf, ARRAY_LEN(buf), var, 1000000ul);
printf("var (%7" PRIu32 " / 1000000) /,%%: %8" PRIu32 " frac: %8" PRIu32 " div: %8" PRIu32 " double: %8" PRIu32 "\n", var, time_divide, time_frac, time_div, time_double);
fill_buf(buf, ARRAY_LEN(buf), seed);
time_frac = bench_frac(buf, ARRAY_LEN(buf), 1000000ul, var);
fill_buf(buf, ARRAY_LEN(buf), seed);
time_divide = bench_divide(buf, ARRAY_LEN(buf), 1000000ul, var);
fill_buf(buf, ARRAY_LEN(buf), seed);
time_double = bench_double(buf, ARRAY_LEN(buf), 1000000ul, var);
printf("var (1000000 / %7" PRIu32 ") /,%%: %8" PRIu32 " frac: %8" PRIu32 " div: N/A double: %8" PRIu32 "\n", var, time_divide, time_frac, time_double);
++variation;
}
Expand Down

0 comments on commit 200cc5c

Please sign in to comment.