Improvement fbvector.computePushBackCapacity
authorNicholas Ormrod <njormrod@fb.com>
Wed, 25 Feb 2015 00:51:24 +0000 (16:51 -0800)
committerAlecs King <int@fb.com>
Tue, 3 Mar 2015 03:29:36 +0000 (19:29 -0800)
commita5709e63e29cd69e4de3e9f463747da9b644844c
treefcadc74e8a184f33d3cb2cb190b1546e312f6064
parent2d16074880202b414b7c6351a24590fcc9bd7026
Improvement fbvector.computePushBackCapacity

Summary:
See the github pull request at https://github.com/facebook/folly/issues/135

Important optimizations: remove one of the branches and change ##empty()## to ##capacity()==0##

Test Plan:
Ran extended fbvector test suite (re-enabled in experimental/njormrod)

Also

fbconfig -r folly && fbmake runtests

Reviewed By: markisaa@fb.com

Subscribers: trunkagent, sdwilsh, njormrod, folly-diffs@, yfeldblum

FB internal diff: D1869112

Tasks: 6338531

Signature: t1:1869112:1424823901:d2d7331aef82edad1e8c159005cc1c7185550d0c
folly/FBVector.h