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
.