-
Notifications
You must be signed in to change notification settings - Fork 263
Performance Optimization Tips
Yu Ding edited this page May 12, 2019
·
2 revisions
This could boost CPU-intensive enclaves about 2~5% (on my 9900K)
In Cargo.toml
:
[profile.release]
lto = true
This could boost enclaves on some platforms.
Set an environment variable as
export RUSTFLAGS="--emit asm"
Or create a .cargo/config
which covers your project as:
[build]
rustflags = ["--emit","asm"]
This could boost enclaves on some platforms (not effective on my 9900K).
Set an environment variable as
export RUSTFLAGS="-C target-cpu=native"
Or create a .cargo/config
which covers your project as:
[build]
rustflags = ["-C", "target-cpu=native"]
Add -flto
to the final linking step using CXX
.