Set codegen-units to 1 in src/rust/Cargo.toml to eke out every last drop of performance
Rust 1.24 now sets codegen-units to 16 by default to speed up compilation time but it makes the final binary slower https://blog.rust-lang.org/2018/02/15/Rust-1.24
For maximum speed, setting
codegen-units
to1
in yourCargo.toml
is needed to eke out every last drop of performance.
So src/rust/Cargo.toml should be changed with that to squeeze the most perf.