mirror of
https://github.com/verilator/verilator.git
synced 2026-10-06 10:03:44 +02:00
Internals: Optimize temporary memory allocations (#6517)
This patch gets rid of over 80% of temporary dynamic memory allocations (when a malloced node is immediately freed with no other malloc in between). It also gets rid of over 20% of all calls to malloc. It's worth ~3% average verilation speed up with tcmalloc, and more without tcmalloc.
This commit is contained in:
@@ -169,11 +169,6 @@ public:
|
||||
//######################################################################
|
||||
// Top Stats class
|
||||
|
||||
void V3Stats::addStatSum(const string& name, double count) VL_MT_SAFE_EXCLUDES(s_mutex) {
|
||||
V3LockGuard lock{s_mutex};
|
||||
addStat(V3Statistic{"*", name, count, 0, true});
|
||||
}
|
||||
|
||||
void V3Stats::statsStageAll(AstNetlist* nodep, const std::string& stage, bool fastOnly) {
|
||||
StatsVisitor{nodep, stage, fastOnly};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user