Re: incremental compilation for opt Rust builds

2018-04-09 Thread Simon Sapin
On 05/04/18 14:19, Henri Sivonen wrote: Can we make a particular vendored crate (encoding_rs) use -O3 while the default for Rust code remains at -O2? There’s an accepted RFC for "per-crate profiles" but it’s not implemented yet: https://github.com/rust-lang/rust/issues/48683 -- Simon Sapin _

Re: incremental compilation for opt Rust builds

2018-04-09 Thread Ted Mielczarek
On Thu, Apr 5, 2018, at 8:19 AM, Henri Sivonen wrote: > For encoding_rs, -O2 vs -O3 has pretty big performance effects in both > directions. (Didn't measure code size.) I think I'd rather have the > -O3 scenario than the -O2 scenario for encoding_rs. > > Can we make a particular vendored crate (en

Re: incremental compilation for opt Rust builds

2018-04-05 Thread Henri Sivonen
On Tue, Mar 13, 2018 at 3:35 PM, Nathan Froyd wrote: > On Tue, Mar 13, 2018 at 3:10 AM, Henri Sivonen wrote: >> On Tue, Mar 13, 2018 at 2:56 AM, Nathan Froyd wrote: >>> (Our release builds use -O2 for Rust code.) >> >> What does cargo bench use by default? >> (https://internals.rust-lang.org/t/d

Re: incremental compilation for opt Rust builds

2018-03-13 Thread Nathan Froyd
On Tue, Mar 13, 2018 at 3:10 AM, Henri Sivonen wrote: > On Tue, Mar 13, 2018 at 2:56 AM, Nathan Froyd wrote: >> (Our release builds use -O2 for Rust code.) > > What does cargo bench use by default? > (https://internals.rust-lang.org/t/default-opt-level-for-release-builds/4581 > suggests -O3.) As

Re: incremental compilation for opt Rust builds

2018-03-13 Thread Alexis Beingessner
Oh and here's the one documented in the nightly docs, just for completeness # The benchmarking profile, used for `cargo bench` and `cargo test --release`.[profile.bench]opt-level = 3debug = falserpath = falselto = falsedebug-assertions = falsecodegen-units = 1panic = 'unwind'incremental = falseove

Re: incremental compilation for opt Rust builds

2018-03-13 Thread Alexis Beingessner
The defaults of the various cargo profiles are documented here: https://doc.rust-lang.org/cargo/reference/manifest.html The relevant entry is: # The benchmarking profile, used for `cargo bench` and `cargo test --release`.[profile.bench]opt-level = 3debug = falserpath = falselto = falsedebug-asser

Re: incremental compilation for opt Rust builds

2018-03-13 Thread Henri Sivonen
On Tue, Mar 13, 2018 at 2:56 AM, Nathan Froyd wrote: > (Our release builds use -O2 for Rust code.) What does cargo bench use by default? (https://internals.rust-lang.org/t/default-opt-level-for-release-builds/4581 suggests -O3.) That is, is cargo bench for a crate that's vendored into m-c reflec