1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-27 19:17:43 +00:00

sort: expand numeric sort section in BENCHMARKING.md a bit

Signed-off-by: Mohammad AlSaleh <CE.Mohammad.AlSaleh@gmail.com>
This commit is contained in:
Mohammad AlSaleh 2025-03-26 11:58:48 +03:00
parent fd38fd69e9
commit 410da77d43

View file

@ -24,8 +24,19 @@ Run `cargo build --release` before benchmarking after you make a change!
## Sorting numbers
- Generate a list of numbers: `seq 0 100000 | sort -R > shuffled_numbers.txt`.
- Benchmark numeric sorting with hyperfine: `hyperfine "target/release/coreutils sort shuffled_numbers.txt -n -o output.txt"`.
- Generate a list of numbers:
```
shuf -i 1-1000000 -n 1000000 > shuffled_numbers.txt
# or
seq 1 1000000 | sort -R > shuffled_numbers.txt
```
- Benchmark numeric sorting with hyperfine
```
hyperfine --warmup 3 \
'/tmp/gnu-sort -n /tmp/shuffled_numbers.txt'
'/tmp/uu_before sort -n /tmp/shuffled_numbers.txt'
'/tmp/uu_after sort -n /tmp/shuffled_numbers.txt'
```
## Sorting numbers with -g