Skip to content

tee: avoid 0fill & heap alloc, remove NamedReader#12519

Open
oech3 wants to merge 1 commit into
uutils:mainfrom
oech3:tee-uninit
Open

tee: avoid 0fill & heap alloc, remove NamedReader#12519
oech3 wants to merge 1 commit into
uutils:mainfrom
oech3:tee-uninit

Conversation

@oech3
Copy link
Copy Markdown
Contributor

@oech3 oech3 commented May 29, 2026

  • Remove NamedReader which is mere Stdin.
  • Stop 0-filling large buffer & drop outdated comment about its size.
  • Dedup 2 read loop.

@oech3 oech3 force-pushed the tee-uninit branch 2 times, most recently from ae2c9d5 to 19697ab Compare May 29, 2026 17:18
@codspeed-hq
Copy link
Copy Markdown

codspeed-hq Bot commented May 29, 2026

Merging this PR will improve performance by 37.19%

⚡ 2 improved benchmarks
✅ 317 untouched benchmarks
⏩ 46 skipped benchmarks1

Performance Changes

Mode Benchmark BASE HEAD Efficiency
Simulation tee_stdin_file[10000000] 233.2 µs 180 µs +29.59%
Memory tee_stdin_file[10000000] 102.7 KB 70.7 KB +45.24%

Tip

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


Comparing oech3:tee-uninit (97df98c) with main (0763c0b)

Open in CodSpeed

Footnotes

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

@oech3 oech3 marked this pull request as ready for review May 29, 2026 17:34
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 29, 2026

GNU testsuite comparison:

Skip an intermittent issue tests/tail/symlink (fails in this run but passes in the 'main' branch)
Skipping an intermittent issue tests/date/date-locale-hour (passes in this run but fails in the 'main' branch)
Congrats! The gnu test tests/dd/no-allocate is now passing!

@oech3 oech3 force-pushed the tee-uninit branch 2 times, most recently from d818e72 to 97df98c Compare May 30, 2026 05:13
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.

1 participant