Skip to content

uucore: provide fallible zeroed allocations - #16549

Merged
sylvestre merged 1 commit into
uutils:mainfrom
xtqqczze:new-vec-zeroed
Nov 27, 2026
Merged

sylvestre merged 1 commit into
uutils:mainfrom
xtqqczze:new-vec-zeroed

Conversation

@xtqqczze

Copy link
Copy Markdown
Collaborator

No description provided.

@xtqqczze
xtqqczze force-pushed the new-vec-zeroed branch 2 times, most recently from 453c6e5 to 3566fe9 Compare November 16, 2026 02:41
@xtqqczze xtqqczze changed the title Implement zeroed buffer allocation Use zerocopy for zeroed buffer allocation Nov 16, 2026
Comment thread src/uu/cp/src/platform/linux.rs Resolved
Comment thread src/uucore/src/lib/features/sum.rs Resolved
Comment thread Cargo.toml Resolved
Comment thread src/uu/split/src/split.rs Resolved
@xtqqczze
xtqqczze marked this pull request as draft November 16, 2026 12:54
@codspeed

codspeed Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Merging this PR will improve performance by 9.62%

1 warning, 1 note

⚠️ 128 benchmarks are dominated by system calls

System calls cannot be simulated consistently and are left out of the measure. The reported value understates the real cost. Switch to the Walltime instrument to measure them.

Learn more about system calls

See affected benchmarks

ℹ️ 1 benchmark has no flamegraph

The flamegraph wasn't generated: most of the time was spent in runtime internals, which would leave nothing useful to analyze.

See affected benchmarks

⚡ 2 improved benchmarks
✅ 413 untouched benchmarks
⏩ 70 skipped benchmarks1

Performance Changes

Mode Benchmark BASE HEAD Efficiency
⚡ CPU Simulation dd_copy_64k_blocks 1.4 ms 1.3 ms +10.9%
⚡ CPU Simulation dd_copy_1m_blocks 916.2 µs 845.6 µs +8.35%

Tip

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


Comparing xtqqczze:new-vec-zeroed (504d33a) with main (ab69b86)2

Open in CodSpeed

Footnotes

  1. 70 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 (5b84528) during the generation of this report, so ab69b86 was used instead as the comparison base. There might be some changes unrelated to this pull request in this report. ↩

@xtqqczze
xtqqczze force-pushed the new-vec-zeroed branch 5 times, most recently from e4bbc51 to 9012314 Compare November 17, 2026 15:24
@github-actions

Copy link
Copy Markdown

Binary size comparison:

Individual binary size comparison VS main (threshold: >=5% AND >=4 KB).

Total size of compared binaries: 155.46 MB (+76 KB, +0.05%)

Significant per-binary changes:
  env     1.20 MB ->    1.28 MB  (+80 KB, +6.51%)

@xtqqczze
xtqqczze marked this pull request as ready for review November 21, 2026 14:18
@xtqqczze

This comment was marked as outdated.

@xtqqczze
xtqqczze force-pushed the new-vec-zeroed branch 2 times, most recently from 976c274 to 37a5d30 Compare November 25, 2026 16:32
@github-actions

Copy link
Copy Markdown

GNU testsuite comparison:

Skipping an intermittent issue tests/tail/inotify-dir-recreate (passes in this run but fails in the 'main' branch)

@sylvestre

Copy link
Copy Markdown
Contributor

the why in the commit message would be appreciated ;)
thanks

Use shared zerocopy-backed helpers for zeroed allocations and propagate allocation failures instead of aborting.
@xtqqczze xtqqczze changed the title Use zerocopy for zeroed buffer allocation uucore: provide fallible zeroed allocations Nov 27, 2026
@sylvestre
sylvestre merged commit 0289758 into uutils:main Nov 27, 2026
198 checks passed
@sylvestre

Copy link
Copy Markdown
Contributor

Thanks for your PR

@xtqqczze
xtqqczze deleted the new-vec-zeroed branch November 27, 2026 22:02
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.

3 participants