My program too slow if I use debug compilation mode,
so I am always compile in release mode,
recently I re-evaluate compile time of my main crate in workspace (rust 1.34.2):
Ok, I try without codgen-units=16, only with incremental = true, build time changes is neglectable,
3.6 secs vs 3.4 secs.
So it is incremental feature gives such huge speedup.
As I rembemer it was introduced long time ago,
but still not true for release build, is it also produces not optimal code?
Yes I saw it and after that actually I posted on this forum.
Because of bottom of issue discussion is related to cargo custom profiles and Windows + anti-viruses.
So looks like this is highly promissing feature development is stopped.
I haven’t read the tracking issue, but would it be possible to instead add a third mode that has most of the optimizations in release, but also has incremental and other things that have a similar performance vs compile time tradeoffs.
There is cargo named profiles: https://github.com/rust-lang/cargo/issues/6988
you can define any profiles that you want, for example you can introduce dev profile that incremetal + release,
but this doesn't improve things if incremental have some pitfals.