bench: report fastwc timing in microseconds
Sub-millisecond runs showed as a flat 0ms, hiding real differences. The suite now times fastwc with a time_us helper, keeps the minimum reading in µs, derives ms from it, and prints both (fastwc: 0ms (767µs)). GNU wc stays at ms precision; solo case shows µs too.
This commit is contained in:
@@ -19,7 +19,7 @@ BENCH_NAME="coreutils"
|
||||
|
||||
printf 'benchmarking %s wc vs fastwc: lines, file input (%s interleaved runs each, minimum kept)\n' \
|
||||
"$BENCH_NAME" "$BENCH_REPS"
|
||||
printf '%-28s %10s %10s %8s %s\n' 'test' 'wc' 'fastwc' 'ratio' 'status'
|
||||
printf '%-28s %10s %22s %8s %s\n' 'test' 'wc' 'fastwc (ms µs)' 'ratio' 'status'
|
||||
|
||||
printf '%s\n' '--- lines ---'
|
||||
if ! run_cases lines -l 10000 100000 1000000 10000000; then
|
||||
|
||||
@@ -17,7 +17,7 @@ BENCH_NAME="coreutils"
|
||||
|
||||
printf 'benchmarking %s wc vs fastwc: words, file input (%s interleaved runs each, minimum kept)\n' \
|
||||
"$BENCH_NAME" "$BENCH_REPS"
|
||||
printf '%-28s %10s %10s %8s %s\n' 'test' 'wc' 'fastwc' 'ratio' 'status'
|
||||
printf '%-28s %10s %22s %8s %s\n' 'test' 'wc' 'fastwc (ms µs)' 'ratio' 'status'
|
||||
|
||||
printf '%s\n' '--- words ---'
|
||||
if ! run_cases words -w 1 10 100 1000 10000 100000; then
|
||||
|
||||
Reference in New Issue
Block a user