summaryrefslogtreecommitdiffstats
path: root/sccomp/source/solver/DifferentialEvolution.hxx
diff options
context:
space:
mode:
authorTakeshi Abe <tabe@fixedpoint.jp>2018-06-23 11:39:47 +0900
committerJulien Nabet <serval2412@yahoo.fr>2018-06-23 10:53:21 +0200
commit578e4eca82132ddbb9475409d0b1a982f61da816 (patch)
tree1447de100b2bd463295854f218ec0dab17a85029 /sccomp/source/solver/DifferentialEvolution.hxx
parentNatvis: visualizers for Sw*Frame (diff)
downloadcore-578e4eca82132ddbb9475409d0b1a982f61da816.tar.gz
core-578e4eca82132ddbb9475409d0b1a982f61da816.zip
sccomp: Reserve enough space at once for micro-optimization
Change-Id: Ib4e178d2a0f09cb44854f1d1aad026d8394a8917 Reviewed-on: https://gerrit.libreoffice.org/56312 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Diffstat (limited to 'sccomp/source/solver/DifferentialEvolution.hxx')
-rw-r--r--sccomp/source/solver/DifferentialEvolution.hxx1
1 files changed, 1 insertions, 0 deletions
diff --git a/sccomp/source/solver/DifferentialEvolution.hxx b/sccomp/source/solver/DifferentialEvolution.hxx
index 2ced9b9d209e..7d18821350aa 100644
--- a/sccomp/source/solver/DifferentialEvolution.hxx
+++ b/sccomp/source/solver/DifferentialEvolution.hxx
@@ -76,6 +76,7 @@ public:
// Initialize population with individuals that have been initialized with uniform random
// noise
// uniform noise means random value inside your search space
+ maPopulation.reserve(mnPopulationSize);
for (size_t i = 0; i < mnPopulationSize; ++i)
{
maPopulation.emplace_back();