3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-10-01 21:49:31 +00:00

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:
Robert O'Callahan 2025-10-01 02:47:47 +00:00
parent 7719beb4ae
commit d45223976a

View file

@ -411,7 +411,7 @@ struct RTLIL::IdString
}
bool empty() const {
return c_str()[0] == 0;
return index_ == 0;
}
void clear() {