1
0
mirror of synced 2026-04-28 12:59:00 +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() {