Enable more release optimizations

This commit is contained in:
Richard Feldman 2020-04-01 21:16:14 -04:00
parent c08f6c34f9
commit 6dbc7a4db0
2 changed files with 5 additions and 1 deletions

View File

@ -24,3 +24,7 @@ members = [
"cli" "cli"
] ]
# Optimizations based on https://deterministic.space/high-performance-rust.html
[profile.release]
lto = "fat"
codegen-units = 1

View File

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
mkdir -p $HOME/.cargo mkdir -p $HOME/.cargo
echo -e "[build]\nrustflags = [\"-C\", \"link-arg=-fuse-ld=lld\"]" > $HOME/.cargo/config echo -e "[build]\nrustflags = [\"-C\", \"link-arg=-fuse-ld=lld\", \"-C\", \"target-cpu=native\"]" > $HOME/.cargo/config
ln -s /usr/bin/lld-8 /usr/local/bin/ld.lld ln -s /usr/bin/lld-8 /usr/local/bin/ld.lld