There's also the factor of 2 for array growth. Probably more magic numbers in there, probably easier to do in an ad-hoc branch.