Shrink block bytecode vectors
Summary:
Shrink BytecodeVec at strategic points: a) when initially creating a Func and b) after each call to optimize. Note that we may lose out on a different memory optimization here: sharing bytecode between Funcs. I believe that because of the first shrink_to_fit, most of the time we'll only do the second when we have mutated (and COWed) the bytecode.
We also pre-size a couple of other vectors - the initializer_list constructor gets it right.
Reviewed By: ricklavoie
Differential Revision:
D22214700
fbshipit-source-id:
cc73913fc33a1db77072d0934003094887e89326