projects
/
yosys.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ea492ab
)
SigMap performance improvement
author
Clifford Wolf
<clifford@clifford.at>
Mon, 1 Feb 2016 09:10:20 +0000
(10:10 +0100)
committer
Clifford Wolf
<clifford@clifford.at>
Mon, 1 Feb 2016 09:10:20 +0000
(10:10 +0100)
kernel/sigtools.h
patch
|
blob
|
history
diff --git
a/kernel/sigtools.h
b/kernel/sigtools.h
index 83ff470d25f3ada33d5215225b775bc3b4eb9798..4e97bb7755061d34c88c683ce8999deae6bebb3d 100644
(file)
--- a/
kernel/sigtools.h
+++ b/
kernel/sigtools.h
@@
-242,7
+242,13
@@
struct SigMap
void set(RTLIL::Module *module)
{
- clear();
+ int bitcount = 0;
+ for (auto &it : module->connections())
+ bitcount += it.first.size();
+
+ database.clear();
+ database.reserve(bitcount);
+
for (auto &it : module->connections())
add(it.first, it.second);
}