From: bert hubert Date: Mon, 7 Dec 2015 06:40:04 +0000 (+0100) Subject: some ring statistics speedups X-Git-Tag: dnsdist-1.0.0-alpha1~112 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3821bfe2a97ed41f748a9deeec1b5de6e922e0b0;p=thirdparty%2Fpdns.git some ring statistics speedups --- diff --git a/pdns/dnsdist-lua.cc b/pdns/dnsdist-lua.cc index 9c577d7b2f..c5a538d152 100644 --- a/pdns/dnsdist-lua.cc +++ b/pdns/dnsdist-lua.cc @@ -704,6 +704,7 @@ vector> setupLua(bool client, const std::string& confi } // cout<<"Looked at "<> rcounts; + rcounts.reserve(counts.size()); for(const auto& c : counts) rcounts.push_back(make_pair(c.second, c.first)); @@ -776,6 +777,7 @@ vector> setupLua(bool client, const std::string& confi } // cout<<"Looked at "<> rcounts; + rcounts.reserve(counts.size()); for(const auto& c : counts) rcounts.push_back(make_pair(c.second, c.first));