From 3c8e6cc25e414fed9dbaadef6fed9cc7efaf3068 Mon Sep 17 00:00:00 2001 From: Roland Reichwein Date: Tue, 31 Mar 2020 12:03:53 +0200 Subject: Optimize start lookup --- grammer.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'grammer.h') diff --git a/grammer.h b/grammer.h index df7ff8d..9b72d3a 100644 --- a/grammer.h +++ b/grammer.h @@ -81,8 +81,7 @@ private: return h0 ^ (h1 << 1) ^ (h2 << 2); } }; - std::unordered_set, TupleHash> m_start_cache; - bool canStartWith(const std::string& non_terminal, size_t variant, const std::string& terminal) const; + std::unordered_map, std::vector, PairHashSS> m_match_lut; void fillStartCache(); void constructTree(); -- cgit v1.2.3