mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 03:27:44 +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:
parent
fd38fd69e9
commit
410da77d43
1 changed files with 13 additions and 2 deletions
|
@ -24,8 +24,19 @@ Run `cargo build --release` before benchmarking after you make a change!
|
||||||
|
|
||||||
## Sorting numbers
|
## Sorting numbers
|
||||||
|
|
||||||
- Generate a list of numbers: `seq 0 100000 | sort -R > shuffled_numbers.txt`.
|
- Generate a list of numbers:
|
||||||
- Benchmark numeric sorting with hyperfine: `hyperfine "target/release/coreutils sort shuffled_numbers.txt -n -o output.txt"`.
|
```
|
||||||
|
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
|
## Sorting numbers with -g
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue