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

The downside is that it makes the size of chrome.dll increase by 1.08MB

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
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-by: Reid Kleckner <>
Reviewed-by: Bruce Dawson <>
Reviewed-by: Scott Violet <>
Commit-Queue: S├ębastien Marchand <>
Cr-Original-Commit-Position: refs/heads/master@{#749479}
Cr-Mirrored-Commit: 113c39f6a41d3feb2066181247850e2d74ee23da
1 file changed