Use the 'optimize_max' compiler config on more targets [win]
This switches some "hot" targets to the "optimize_max" compiler config.
The "hot" targets have been picked base on the go/cwp data, this CL
makes the assumption that the hotness of the code is more or less the
same on different platforms (which seems like a fair assumption for
things like Mojo and //net).
Pinpoint will be used to evaluate the exact impact of this CL on metrics,
local benchmarks (with Speedometer 2.0) shows a 4% performance
improvement (based on the average after 5 runs of the Speedometer 2.0
benchmark).
The downside is that it makes the size of chrome.dll increase by 1.08MB
(~0.8%).
The change consist in adding this to the config of the hot targets:
if (!is_debug) {
configs -= [ "//build/config/compiler:default_optimization" ]
configs += [ "//build/config/compiler:optimize_max" ]
}
There's no |is_win| condition here as this is a noop on all platforms
other than Windows, see
https://cs.chromium.org/chromium/src/build/config/compiler/BUILD.gn?rcl=3a8f3f7de7291ccb2045a285965daf4053ac5739
The "optimize" config on !is_win is usually:
cflags = [ "-O2" ] + common_optimize_on_cflags
which is the same as the "optimize_max" config for these same targets.
Bug: 1059861
Change-Id: Ib28781c7e56943650725fec9c50aa11bef413fbd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2095339
Reviewed-by: Reid Kleckner <rnk@chromium.org>
Reviewed-by: Bruce Dawson <brucedawson@chromium.org>
Reviewed-by: Scott Violet <sky@chromium.org>
Commit-Queue: Sébastien Marchand <sebmarchand@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#749479}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 113c39f6a41d3feb2066181247850e2d74ee23da
1 file changed