Skip to content

Conversation

sylvestre
Copy link
Contributor

@sylvestre sylvestre commented Oct 4, 2025

hyperfine --warmup 3 "/usr/bin/nl moby64.txt"                     "./target/release/coreutils.prev nl  moby64.txt" "./target/release/coreutils nl moby64.txt"
Benchmark 1: /usr/bin/nl moby64.txt
  Time (mean ± σ):     179.8 ms ±   3.1 ms    [User: 165.6 ms, System: 14.1 ms]
  Range (min … max):   173.6 ms … 184.0 ms    16 runs

Benchmark 2: ./target/release/coreutils.prev nl  moby64.txt
  Time (mean ± σ):     380.6 ms ±   4.9 ms    [User: 278.2 ms, System: 102.2 ms]
  Range (min … max):   375.4 ms … 391.4 ms    10 runs

Benchmark 3: ./target/release/coreutils nl moby64.txt
  Time (mean ± σ):     167.3 ms ±   1.7 ms    [User: 154.5 ms, System: 12.7 ms]
  Range (min … max):   163.8 ms … 170.0 ms    17 runs

Summary
  ./target/release/coreutils nl moby64.txt ran
    1.07 ± 0.02 times faster than /usr/bin/nl moby64.txt
    2.27 ± 0.04 times faster than ./target/release/coreutils.prev nl  moby64.txt

Copy link

github-actions bot commented Oct 4, 2025

GNU testsuite comparison:

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

Copy link

codspeed-hq bot commented Oct 4, 2025

CodSpeed Performance Report

Merging #8811 will improve performances by 27.71%

Comparing sylvestre:perf-nl (8ec28bb) with main (94b6544)

Summary

⚡ 2 improvements
✅ 75 untouched
⏩ 73 skipped1

Benchmarks breakdown

Benchmark BASE HEAD Change
nl_large_file[10] 128.1 ms 100.6 ms +27.34%
nl_many_lines[100000] 101.6 ms 79.5 ms +27.71%

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 19:19
@cakebaker cakebaker merged commit d7fb7b7 into uutils:main Oct 5, 2025
98 checks passed
@cakebaker
Copy link
Contributor

Kudos for improving the performance by almost 30% :)

@sylvestre sylvestre deleted the perf-nl branch October 5, 2025 11:52
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