On Tue, Mar 13, 2018 at 3:10 AM, Henri Sivonen <[email protected]> wrote: > On Tue, Mar 13, 2018 at 2:56 AM, Nathan Froyd <[email protected]> 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 mentioned by Alexis, -O3 is indeed what gets used by default. > 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? I do not know. I know that folks working on WebRender were finding that -O3 produces *much* better code for certain things; they filed bugs for rustc that I can't find right now. I don't know if those bugs have been addressed. When Stylo was getting off the ground a year ago, mbrubeck did some -O2 vs. -O3 size analysis, which led to some -O2 vs. -O3 performance analysis in https://bugzilla.mozilla.org/show_bug.cgi?id=1328954. The conclusion there is that -O3 wasn't worth it and came with a reasonably large codesize increase. I guess the answer is "probably, but you should measure to make sure"? -Nathan _______________________________________________ dev-platform mailing list [email protected] https://lists.mozilla.org/listinfo/dev-platform

