mirror of
https://github.com/YosysHQ/yosys
synced 2025-10-02 05:59: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:
parent
7719beb4ae
commit
d45223976a
1 changed files with 1 additions and 1 deletions
|
@ -411,7 +411,7 @@ struct RTLIL::IdString
|
||||||
}
|
}
|
||||||
|
|
||||||
bool empty() const {
|
bool empty() const {
|
||||||
return c_str()[0] == 0;
|
return index_ == 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void clear() {
|
void clear() {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue