Make Courgette as much as 5x faster.

Changes the Courgette vector implementation to slightly
over-reserve the size of the vector, which makes many future
reserve operations no-ops (as they're quite expensive otherwise,
since they copy the full contents of the previous buffer).

When applying the patch from 35.0.1916.114 to 37.0.2062.120,
before and after this change, the runtime goes from 1m10s to 21s
on my z620.

Slightly higher multipliers produce even better results (e.g. 19s),
but this seemed like a reasonable value to chose so that it doesn't
result in significant additional memory use by Courgette.

BUG=167622
TEST=Build courgette target in Release mode and run it as
courgette.exe -apply chrome.7z chrome_patch.diff out.7z
(where chrome.7z was from un7zipping a 37.0.2062.94 chrome
installer and chrome_patch.diff was from un7zipping a
37.0.2062.94 -> 37.0.2062.120_37 chrome_updater_3stage.exe).
With the patch, the operation should run ~5x faster.

Review URL: https://codereview.chromium.org/565753002

Cr-Commit-Position: refs/heads/master@{#294592}
1 file changed