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 = falseoverflow-checks = false



On Tue, Mar 13, 2018 at 9:24 AM, Alexis Beingessner <a.beingess...@gmail.com
> wrote:

> 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-assertions = falsecodegen-units = 1panic = 'unwind'
>
> Note that we always build with panic=abort which improves codegen; not
> sure about which conditions we use lto for rust code off the top of my head.
>
>
> On Tue, Mar 13, 2018 at 3:10 AM, Henri Sivonen <hsivo...@hsivonen.fi>
> wrote:
>
>> On Tue, Mar 13, 2018 at 2:56 AM, Nathan Froyd <nfr...@mozilla.com> 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-rel
>> ease-builds/4581
>> suggests -O3.)
>>
>> That is, is cargo bench for a crate that's vendored into m-c
>> reflective of that crate's performance when included in a Firefox
>> release?
>>
>> --
>> Henri Sivonen
>> hsivo...@hsivonen.fi
>> https://hsivonen.fi/
>> _______________________________________________
>> dev-platform mailing list
>> dev-platform@lists.mozilla.org
>> https://lists.mozilla.org/listinfo/dev-platform
>>
>
>
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to