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))