Skip to content

unexpand: use buffered read#10798

Merged
sylvestre merged 1 commit intouutils:mainfrom
cerdelen:unexpand_buffer
Feb 8, 2026
Merged

unexpand: use buffered read#10798
sylvestre merged 1 commit intouutils:mainfrom
cerdelen:unexpand_buffer

Conversation

@cerdelen
Copy link
Contributor

@cerdelen cerdelen commented Feb 7, 2026

Changing from using read_until to read() and necessary additions to the unexpand_line function to keep behaviour.

Fix: #10698

@codspeed-hq
Copy link

codspeed-hq bot commented Feb 7, 2026

CodSpeed Performance Report

Merging this PR will improve performance by 34.66%

Comparing cerdelen:unexpand_buffer (f1f58b8) with main (dc982b1)

Summary

⚡ 2 improved benchmarks
✅ 282 untouched benchmarks
⏩ 38 skipped benchmarks1

Performance Changes

Mode Benchmark BASE HEAD Efficiency
Simulation unexpand_many_lines[100000] 263.6 ms 195.8 ms +34.64%
Simulation unexpand_large_file[10] 552.6 ms 410.4 ms +34.66%

Footnotes

  1. 38 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 merged commit 4bbd71f into uutils:main Feb 8, 2026
154 of 155 checks passed
@oech3 oech3 mentioned this pull request Feb 8, 2026
@oech3
Copy link
Contributor

oech3 commented Feb 8, 2026

You fixed performance regression with cgu=1 too: #10817 . Great!

@sylvestre
Copy link
Contributor

i missed all the files in tests/fixtures/unexpand/
i will revert it, please create these files on the fly
they don't need to be in the repo

@cerdelen
Copy link
Contributor Author

cerdelen commented Feb 8, 2026

@sylvestre I changed the tests to not use files. Should i open a new PR or can it still be merged through this one here?

oech3 pushed a commit to oech3/coreutils that referenced this pull request Feb 9, 2026
oech3 pushed a commit to oech3/coreutils that referenced this pull request Feb 9, 2026
cerdelen added a commit to cerdelen/coreutils that referenced this pull request Feb 12, 2026
cerdelen pushed a commit to cerdelen/coreutils that referenced this pull request Feb 12, 2026
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.

unexpand: unexpand /dev/zero panic

3 participants