Skip to content

Conversation

@sylvestre
Copy link
Contributor

hyperfine --warmup 3 "/usr/bin/fold -w 40 moby64.txt"                     "./target/release/coreutils.prev fold -w 40 moby64.txt" "./target/release/coreutils fold -w 40 moby64.txt"
Benchmark 1: /usr/bin/fold -w 40 moby64.txt
  Time (mean ± σ):     167.7 ms ±   3.4 ms    [User: 154.7 ms, System: 12.8 ms]
  Range (min … max):   162.7 ms … 174.8 ms    17 runs

Benchmark 2: ./target/release/coreutils.prev fold -w 40 moby64.txt
  Time (mean ± σ):     521.3 ms ±   8.3 ms    [User: 347.4 ms, System: 173.8 ms]
  Range (min … max):   516.1 ms … 543.2 ms    10 runs

Benchmark 3: ./target/release/coreutils fold -w 40 moby64.txt
  Time (mean ± σ):     167.0 ms ±   2.6 ms    [User: 156.9 ms, System: 9.9 ms]
  Range (min … max):   162.8 ms … 170.7 ms    17 runs

Summary
  ./target/release/coreutils fold -w 40 moby64.txt ran
    1.00 ± 0.03 times faster than /usr/bin/fold -w 40 moby64.txt
    3.12 ± 0.07 times faster than ./target/release/coreutils.prev fold -w 40 moby64.txt

@github-actions
Copy link

github-actions bot commented Oct 4, 2025

GNU testsuite comparison:

Skip an intermittent issue tests/misc/tee (fails in this run but passes in the 'main' branch)
Skip an intermittent issue tests/tail/overlay-headers (fails in this run but passes in the 'main' branch)

@codspeed-hq
Copy link

codspeed-hq bot commented Oct 4, 2025

CodSpeed Performance Report

Merging #8804 will improve performances by 30.51%

Comparing sylvestre:fold-perf (b3d16cc) with main (be25344)

Summary

⚡ 2 improvements
✅ 67 untouched
⏩ 73 skipped1

Benchmarks breakdown

Benchmark BASE HEAD Change
fold_custom_width[50000] 60.8 ms 46.6 ms +30.51%
fold_many_lines[100000] 153.1 ms 125.3 ms +22.11%

Footnotes

  1. 73 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@sylvestre sylvestre marked this pull request as ready for review October 4, 2025 08:36
@cakebaker cakebaker merged commit f08f4d0 into uutils:main Oct 4, 2025
97 checks passed
@cakebaker
Copy link
Contributor

Kudos to the 3x performance improvement compared to before :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants