top | item 38396228

(no title)

herbstein | 2 years ago

> It looked like about half of that time was spent compiling the coreutils multicall (Busybox-style) binary itself

Using a different linker (like mold) might change that, if most of the time is spent linking everything together.

discuss

order

tczMUFlmoNk|2 years ago

mold didn't seem to help very much, surprisingly! (97s -> 90s.) I checked that it did actually make it into the linker pipeline:

    $ readelf -p .comment ./target/release/coreutils 

    String dump of section '.comment':
      [     0]  rustc version 1.74.0 (79e9716c9 2023-11-13)
      [    2c]  GCC: (Ubuntu 12.3.0-1ubuntu1~22.04) 12.3.0
      [    57]  mold 2.3.3 (49066ea329979c3187556091ba62421594799fd1; compatible with GNU ld)
      [    a6]  GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
I may have done something wrong; let me know if you get substantially different results.

(Edited for new timings with mold 2.3.3 instead of 1.0.3.)