From 084a94ab2ba7b015cfcdc79415ecb6e3a36ebe39 Mon Sep 17 00:00:00 2001 From: vaclavt Date: Sun, 6 Mar 2022 19:59:38 +0100 Subject: [PATCH] do not reserve lamdas vector --- ml.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/ml.cpp b/ml.cpp index ed47495..c90b3d8 100644 --- a/ml.cpp +++ b/ml.cpp @@ -2289,6 +2289,7 @@ MlValue MlEnvironment::get(const std::string &name) const { // Get vector of executables in this scope std::vector MlEnvironment::get_lambdas_list(const std::string &token) const { std::vector lambdas{}; + lambdas.reserve(16); for (auto it = defs.begin(); it != defs.end(); it++) if (it->second.get_type_name() == FUNCTION_TYPE && (token.empty() || it->first.find(token) == 0))