miloyip/rapidjson — pull request #130 by pah (2014-09-01 07:19:24+00:00)
Title: GenericValue: reduce growth factor for array/object reallocations

As mentioned by @kosta-github in [#128], the currently used growth factor of 2 is suboptimal for memory performance. An extensive discussion on the topic can be found in the [FBVector] documentation.

This pull-request reduces the array/object capacity growth factor to 1.5, which many C++ implementations have chosen to use. In order to avoid floating-point arithmetic for computing the new capacity, I did not
add any customization parameter for the factor and used a shift+add instead.

[#128]: http://git.io/0gkYSg
[FBVector]: https://github.com/facebook/folly/blob/master/folly/docs/FBVector.md