uutils / uutils/coreutils

Case where GNU `sort` is 40 times faster than uutils

Open
#12,138 0 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

Using uu-sort compiled with make PROFILE=release:

$ for i in $(echo {a..z} | tr ' ' '\n' | shuf); do head -c $(numfmt --from=iec 200M) < /dev/zero | tr '\0' "$i" >> input; printf '\n' >> input; done
$ export LC_ALL=en_US.UTF-8
$ time uu-sort --parallel 1 --buffer-size 8G input > /dev/null

real	2m41.536s
user	2m25.988s
sys	0m9.907s
$ time sort --parallel 1 --buffer-size 8G input > /dev/null

real	0m4.073s
user	0m0.281s
sys	0m3.448s

This is probably due to using collation keys.

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

Reproduce the reported uu-sort and GNU sort benchmark with LC_ALL=en_US.UTF-8, --parallel 1, and --buffer-size 8G on the generated input. Then trace uu-sort's collation-key path and measure it against the same workload; done means identifying and fixing the source of the slowdown and demonstrating the result with a comparable benchmark.

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
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.