diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2022-11-29 13:28:14 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2022-11-29 13:28:14 +0200 |
commit | bd90dfbbbca15500b826eb9a4bb6959aedbe28f7 (patch) | |
tree | 2fee716cf636e7e50797eb07b23e5f0eb17f8f4b /libbuild2/script/regex.hxx | |
parent | ea1a4a3c8b7551a59667889edc35f806fd2ce45a (diff) |
Use list instead of unordered_set in regex line_pool
Diffstat (limited to 'libbuild2/script/regex.hxx')
-rw-r--r-- | libbuild2/script/regex.hxx | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/libbuild2/script/regex.hxx b/libbuild2/script/regex.hxx index e043c99..f6cf566 100644 --- a/libbuild2/script/regex.hxx +++ b/libbuild2/script/regex.hxx @@ -9,7 +9,6 @@ #include <locale> #include <string> // basic_string #include <type_traits> // make_unsigned, enable_if, is_* -#include <unordered_set> #include <libbuild2/types.hxx> #include <libbuild2/utility.hxx> @@ -59,7 +58,12 @@ namespace build2 // Note that we assume the pool can be moved without invalidating // pointers to any already pooled entities. // - std::unordered_set<char_string> strings; + // Note that we used to use unordered_set for strings but (1) there is + // no general expectation that we will have many identical strings and + // (2) the number of strings is not expected to be large. So that felt + // like an overkill and we now use a list with linear search. + // + std::list<char_string> strings; std::list<char_regex> regexes; }; |