Skip to content

shuf: prepare args outside benchmark#10493

Open
xtqqczze wants to merge 1 commit intouutils:mainfrom
xtqqczze:shuf/get_benchmark_args
Open

shuf: prepare args outside benchmark#10493
xtqqczze wants to merge 1 commit intouutils:mainfrom
xtqqczze:shuf/get_benchmark_args

Conversation

@xtqqczze
Copy link
Contributor

Split from #10388

@oech3
Copy link
Contributor

oech3 commented Jan 26, 2026

Thankyou!

@github-actions
Copy link

GNU testsuite comparison:

Congrats! The gnu test tests/tail/retry is no longer failing!

@ChrisDryden
Copy link
Collaborator

When I'm reading the code changes the memory benefit is intuitively there, but when I'm looking at the comparisons I don't see any difference. Is the expectation that this will only impact a small subset of the benchmarks? https://codspeed.io/uutils/coreutils/runs/compare/6977c5ceca5d5cfb0f1ce7a5..69779602f6180a419cc41917?uri=src%2Fuu%2Fshuf%2Fbenches%2Fshuf_bench.rs%3A%3Ashuf_lines%255B100000%255D&runnerMode=Memory&q=mode%3Amemory+shuf

@xtqqczze
Copy link
Contributor Author

We shouldn’t be allocating unnecessarily to prepare arguments inside the measured section. We don’t want to be measuring the performance of the allocator itself, so any allocation work should happen before the benchmark runs. In this case it’s quite possible we aren’t allocating enough to see a meaningful difference.

@sylvestre
Copy link
Contributor

i am not convinced why we should land this PR, could you please explain a bit more ? :)

@oech3
Copy link
Contributor

oech3 commented Jan 27, 2026

Separated to investigate #10486

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.

4 participants