Skip to content

od: stream the output line instead of buffering it - #14692

Merged
sylvestre merged 1 commit into
uutils:mainfrom
sylvestre:od-big
Sep 18, 2026
Merged

sylvestre merged 1 commit into
uutils:mainfrom
sylvestre:od-big

Conversation

@sylvestre

Copy link
Copy Markdown
Contributor

A line is padded up to the full -w width before the ascii dump, and the formatted fields themselves take about 4 bytes per input byte, so od -w3037000500 -tcz built a 12 GB String. Write the offset, the fields and the padding straight to the writer, tracking the line width as it goes instead of measuring a buffered string.

Should fix tests/od/big-w.sh

Copilot AI lite review requested due to automatic review settings September 18, 2026 20:16

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

A line is padded up to the full -w width before the ascii dump, and the
formatted fields themselves take about 4 bytes per input byte, so
`od -w3037000500 -tcz` built a 12 GB String. Write the offset, the
fields and the padding straight to the writer, tracking the line width
as it goes instead of measuring a buffered string.

Should fix tests/od/big-w.sh
Copilot AI review requested due to automatic review settings September 18, 2026 20:38

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@codspeed

codspeed Bot commented Sep 18, 2026

Copy link
Copy Markdown

Merging this PR will improve performance by 15.18%

⚠️ Different runtime environments detected

Some benchmarks with significant performance changes were compared across different runtime environments,
which may affect the accuracy of the results.

Open the report in CodSpeed to investigate

⚡ 3 improved benchmarks
✅ 3 untouched benchmarks
⏩ 418 skipped benchmarks1

Performance Changes

Mode Benchmark BASE HEAD Efficiency
Simulation od_default 601.3 ms 511.8 ms +17.49%
Simulation od_chars 948.2 ms 831.2 ms +14.07%
Simulation od_hex_bytes 991.8 ms 870.1 ms +14%

Tip

Curious why performance improved? Comment @codspeedbot explain why performance improved on this PR, or directly use the CodSpeed MCP with your agent.


Comparing sylvestre:od-big (8c7ec47) with main (58490b3)2

Open in CodSpeed

Footnotes

  1. 418 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.

  2. No successful run was found on main (848ad09) during the generation of this report, so 58490b3 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

@github-actions

Copy link
Copy Markdown

GNU testsuite comparison:

Skip an intermittent issue tests/date/resolution (fails in this run but passes in the 'main' branch)
Skip an intermittent issue tests/pr/bounded-memory (fails in this run but passes in the 'main' branch)
Skipping an intermittent issue tests/tail/inotify-dir-recreate (passes in this run but fails in the 'main' branch)

@sylvestre
sylvestre enabled auto-merge (rebase) September 18, 2026 22:20
@sylvestre
sylvestre merged commit ff748a3 into uutils:main Sep 18, 2026
103 checks passed
@sylvestre
sylvestre deleted the od-big branch September 18, 2026 22:21
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