Open space-alien opened 3 years ago
Perhaps the culprit is codegen-units=1
. When I set this on my release profile, I am able to reproduce the performance drop.
Perhaps the culprit is
codegen-units=1
.
I have experienced a similar situation where the assembly code printed by asm
does not coincide with the one actually built by cargo build --release
, but they do if i use RUSTFLAGS="-Ccodegen-units=1" cargo build --release
.
Unfortunately this project seems both broken and dead...
After running
cargo asm
, I am noticing a very significant performance drop when running my release build, which I do not understand.Given this, I wonder whether cargo asm is building my project in a different way to the normal release build. My primary concen is that the asm being produced by
cargo asm
may not be the same as the normal release build, since I imagine that the performance drop would indicate a significant difference in the compiled output.Toolchain info:
nightly-x86_64-pc-windows-msvc (default) rustc 1.56.0-nightly (d3e2578c3 2021-08-21)
My process: (1) Regular release build:
cargo build --release
target/release/myproject.exe
-> Normal (i.e. fast) performance(2) Run cargo asm:
cargo asm
target/release/myproject.exe
-> Performance drops substantially (in my case, the normal release build is 50% faster)