Skip to content

wc: don't allocate buffer if splice() fast-path succeed#11903

Closed
oech3 wants to merge 2 commits intouutils:mainfrom
oech3:wc-c-heap
Closed

wc: don't allocate buffer if splice() fast-path succeed#11903
oech3 wants to merge 2 commits intouutils:mainfrom
oech3:wc-c-heap

Conversation

@oech3
Copy link
Copy Markdown
Contributor

@oech3 oech3 commented Apr 19, 2026

No description provided.

@oech3
Copy link
Copy Markdown
Contributor Author

oech3 commented Apr 19, 2026

wc_bytes_synthetic[500]
src/uu/wc/benches/wc_bench.rs
0%
81.6 µs
81.5 µs

wc_bytes_synthetic[1]
src/uu/wc/benches/wc_bench.rs
0%
83.8 µs
83.7 µs

@xtqqczze
Copy link
Copy Markdown
Contributor

But since vec! allocates on the heap, this is worse then just using the existing stack space.

@oech3

This comment was marked as low quality.

@oech3
Copy link
Copy Markdown
Contributor Author

oech3 commented Apr 19, 2026

Closing. I would do same things with #11906 .

@oech3 oech3 closed this Apr 19, 2026
@oech3 oech3 deleted the wc-c-heap branch April 19, 2026 20:01
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