diff --git a/Changes b/Changes index 809d45d07..830293acf 100644 --- a/Changes +++ b/Changes @@ -14,6 +14,7 @@ Verilator 4.215 devel **Minor:** * Internal code cleanups and improvements. [Geza Lore] +* Improve --thread verilation-time performance. * Fix array method names with parens (#3181) (#3183). [Teng Huang] * Fix split_var assign merging (#3177) (#3179). [Yutetsu TAKATSUKASA] * Fix nested generate if genblk naming (#3189). [yanx21] diff --git a/src/V3Scoreboard.h b/src/V3Scoreboard.h index bfd267c85..edb2165de 100644 --- a/src/V3Scoreboard.h +++ b/src/V3Scoreboard.h @@ -29,9 +29,9 @@ #include "V3Error.h" +#include #include #include -#include //###################################################################### // SortByValueMap @@ -363,7 +363,11 @@ private: using UserScoreFnp = T_Score (*)(const T_Elem*); // MEMBERS - std::unordered_set m_unknown; // Elements with unknown scores + // Below uses set<> not an unordered_set<>. unordered_set::clear() and + // construction results in a 491KB clear operation to zero all the + // buckets. Since the set size is generally small, and we iterate the + // set members, set is better performant. + std::set m_unknown; // Elements with unknown scores SortedMap m_sorted; // Set of elements with known scores UserScoreFnp m_scoreFnp; // Scoring function bool m_slowAsserts; // Do some asserts that require extra lookups