rtlil: Improve performance of SigSpec::extract(SigSpec, SigSpec*)
authorRick Altherr <kc8apf@kc8apf.net>
Sun, 31 Jan 2016 17:07:21 +0000 (09:07 -0800)
committerRick Altherr <kc8apf@kc8apf.net>
Sun, 31 Jan 2016 17:20:16 +0000 (09:20 -0800)
commit3c48de8e218ff70f4b5f8e42a6794a48354ea062
tree8e81ca35b190f2ed0f1f3e9e65caac6660527fc6
parent0265d7b1006e0946eb4635d73a6d49d31b3e4235
rtlil: Improve performance of SigSpec::extract(SigSpec, SigSpec*)

Converting to a pool<SigBit> is fairly expensive due to inserts somewhat
frequently causing rehashing.  Instead, walk through the pattern SigSpec
directly on a chunk-by-chunk basis and apply it to this SigSpec's
individual bits.  Using chunks for the pattern minimizes the number of
iterations in the outer loop.
kernel/rtlil.cc