-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Description
Currently, uutils have a much slower command startup time compared to GNU coreutils.
This may not be strictly speaking a bug, but something to be aware of (and may be to track)
Context:
Ubuntu 25.10 has switched to uutils for some of the core utilities.
This caused a regression in run times of some third-party shell scripts (a custom build system) that call core utilities a lot. Each call makes very little work, but there many of them; it seems mostly ln is problematic (there are also a lot of cp and sed calls, but these are still GNU versions in Ubuntu). Yes, the scripts are probably not optimal and could be rewritten to make fewer calls, but it is what it is.
Benchmarking
touch src.txt
hyperfine -N --warmup 10 "ln -s -f src.txt dst.txt" "gnuln -s -f src.txt dst.tct"Output:
Benchmark 1: ln -s -f src.txt dst.txt
Time (mean ± σ): 2.0 ms ± 0.2 ms [User: 0.5 ms, System: 1.5 ms]
Range (min … max): 1.7 ms … 8.7 ms 1547 runs
Warning: Statistical outliers were detected. Consider re-running this benchmark on a quiet system without any interferences from other programs. It might help to use the '--warmup' or '--prepare' options.
Benchmark 2: gnuln -s -f src.txt dst.tct
Time (mean ± σ): 645.7 µs ± 60.9 µs [User: 292.5 µs, System: 287.0 µs]
Range (min … max): 520.2 µs … 883.3 µs 4263 runs
Summary
gnuln -s -f src.txt dst.tct ran
3.14 ± 0.44 times faster than ln -s -f src.txt dst.txt
System info:
- Ubuntu 25.10
- uutils installed from Ubuntu repository, version
0.2.2-0ubuntu2.1;ln --version->ln (uutils coreutils) 0.2.2 - Ryzen 5700G CPU (8 cores 16 threads), 32 GB RAM, fast SSD
I also made a benchmark on an older system (Intel 6200U laptop), with even bigger difference (about 4×)
Discussion
At least as it is shipped in Ubuntu, uutils are actually one multicall 10 MB binary that does different things depending on with which name it is called. Maybe this is a factor here, as it may present more work for a loader.
To my understanding, uutils currently has a benchmark suite that tracks performance of various algorithms, to not command startup time