uutils / uutils/coreutils

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

Open
#13,204 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

U - sort
Dominant language
Rust
Stars
24.1k
Forks
2k
Avg merge
1d 5h
Merged PRs (30d)
365

Description

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$ 

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the reported hyperfine comparison between ./sort random_data and gnusort using a similarly sized random file. Then locate the sort implementation and profile the workload to identify the source of the slowdown. Done means the cause is addressed and the benchmark is rerun to verify the performance change.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli, performance
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.