Improve codegen of generation_list_t::operator==

Bizarrely comparing three integers showed up heavy in traces. This
reduces the time in seq_echo by about 500 msec.
This commit is contained in:
ridiculousfish 2020-08-07 23:13:13 -07:00
parent 5bee1e3e1f
commit 3dcb39f8ec

View file

@ -107,7 +107,10 @@ class generation_list_t {
return valid;
}
bool operator==(const generation_list_t &rhs) const { return as_array() == rhs.as_array(); }
bool operator==(const generation_list_t &rhs) const {
return sighupint == rhs.sighupint && sigchld == rhs.sigchld &&
internal_exit == rhs.internal_exit;
}
bool operator!=(const generation_list_t &rhs) const { return !(*this == rhs); }