mirror of
git://git.sv.gnu.org/coreutils
synced 2026-05-08 16:09:34 -04:00
ebe2b7513e
On an AMD Ryzen 7 3700X running GNU/Linux:
$ timeout 30 taskset 1 ./src/shuf-prev \
-r -i 1000000-1000000 | pv -r > /dev/null
[ 302MiB/s]
$ timeout 30 taskset 1 ./src/shuf \
-r -i 1000000-1000000 | pv -r > /dev/null
[ 434MiB/s]
* src/shuf.c (print_number): New function.
(write_permuted_numbers, write_random_numbers): Use it.
* tests/shuf/shuf.sh: Add a test case to run 'shuf -i' with varying
numbers of digits to check that the string conversion is correct.