mirror of https://github.com/YosysHQ/yosys.git
Optimize `IdString::empty()`
I actually saw this take 0.6% of the time in an `opt_clean` pass (under Module::check()). Trivial issue, but the fix is also trivial and simple.
This commit is contained in:
parent
7719beb4ae
commit
d45223976a
|
|
@ -411,7 +411,7 @@ struct RTLIL::IdString
|
|||
}
|
||||
|
||||
bool empty() const {
|
||||
return c_str()[0] == 0;
|
||||
return index_ == 0;
|
||||
}
|
||||
|
||||
void clear() {
|
||||
|
|
|
|||
Loading…
Reference in New Issue