Skip to content

Instantly share code, notes, and snippets.

@msfjarvis
Last active February 1, 2020 10:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save msfjarvis/f0f6a286e0c2ac7add25e9a49949f95d to your computer and use it in GitHub Desktop.
Save msfjarvis/f0f6a286e0c2ac7add25e9a49949f95d to your computer and use it in GitHub Desktop.
rustc benchmark with and without LLD as linker

Tests are run on a fairly powerful AMD Ryzen 5 1600 (12) @ 3.200GHz under as low system stress as possible. All non-critical applications were shutdown before this test.

The project being tested is fairly small so your mileage as far as improvements are considered will vary.

Command Mean [s] Min [s] Max [s] Relative
cargo --offline build 30.463 ± 0.141 30.358 30.758 1.10 ± 0.02
RUSTFLAGS="-C link-arg=-fuse-ld=lld" cargo --offline build 27.798 ± 0.600 27.013 28.706 1.00
Command Mean [s] Min [s] Max [s] Relative
cargo --offline build --release 62.886 ± 0.564 62.288 64.056 1.02 ± 0.01
RUSTFLAGS="-C link-arg=-fuse-ld=lld" cargo --offline build --release 61.621 ± 0.465 60.994 62.411 1.00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment