Skip to content

Commit

Permalink
- switched to using \\SI (from siunitx package) to formatting numbers
Browse files Browse the repository at this point in the history
  with their units;
  • Loading branch information
jaltmayerpizzorno committed May 22, 2023
1 parent 9ffb1d7 commit d8c8f5b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions benchmarks/benchmarks.py
Original file line number Diff line number Diff line change
Expand Up @@ -491,12 +491,12 @@ def texttt(s):
base_result = median(results['base'][bench.name]['times'])

if args.absolute:
line += f" & {base_result:.1f}s"
line += f" & \\SI{{{base_result:.1f}}}{{s}}"

for case in nonbase_cases:
if args.absolute:
r = median(results[case.name][bench.name]['times'])
line += f" & {r:.1f}s"
line += f" & \\SI{{{r:.1f}}}{{s}}"
else:
r = median(results[case.name][bench.name]['times']) / base_result
line += f" & {r:.2f}$\\times$"
Expand Down
4 changes: 2 additions & 2 deletions benchmarks/plot_versions.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,12 +135,12 @@ def texttt(s):
base_result = v2r[version]['base'][args.bench]['median']

if args.absolute:
line += f" & {base_result:.1f}s"
line += f" & \\SI{{{base_result:.1f}}}{{s}}"

for case in nonbase_cases:
if args.absolute:
r = v2r[version][case.name][args.bench]['median']
line += f" & {r:.1f}s"
line += f" & \\SI{{{r:.1f}}}{{s}}"
else:
r = v2r[version][case.name][args.bench]['median'] / base_result
line += f" & {r:.2f}$\\times$"
Expand Down

0 comments on commit d8c8f5b

Please sign in to comment.