Skip to content

perf(sort): Benchmark with a random 95MB file slow #13204

Description

@HackingRepo

Hi, uutils mainteners

i confirmed that the uu sort extremly a slow with 95MB file, as we did in the benchmark

relunsec@relunsec:~/software/coreutils/target/release$ cat /dev/urandom > random_data
^C
relunsec@relunsec:~/software/coreutils/target/release$ ls -lh random_data 
-rw-rw-r-- 1 relunsec relunsec 95M Jun 29 08:37 random_data
relunsec@relunsec:~/software/coreutils/target/release$ hyperfine --shell=none --warmup 3 "./sort random_data" "gnusort random_data"
Benchmark 1: ./sort random_data
  Time (mean ± σ):      5.487 s ±  0.040 s    [User: 6.048 s, System: 0.211 s]
  Range (min … max):    5.447 s …  5.566 s    10 runs
 
Benchmark 2: gnusort random_data
  Time (mean ± σ):      1.620 s ±  0.030 s    [User: 4.360 s, System: 0.138 s]
  Range (min … max):    1.581 s …  1.676 s    10 runs
 
Summary
  gnusort random_data ran
    3.39 ± 0.07 times faster than ./sort random_data
relunsec@relunsec:~/software/coreutils/target/release$ 

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions