The Person::update_status function uses the IN template function which right now is causing a bit of a bottleneck. Instead of checking set inclusion, we could leverage that statuses are unsigned ints, and thus an updating function could be reached by simply accessing by index, i.e., update_status_funs[p->status_current]();.
The
Person::update_status
function uses theIN
template function which right now is causing a bit of a bottleneck. Instead of checking set inclusion, we could leverage that statuses are unsigned ints, and thus an updating function could be reached by simply accessing by index, i.e.,update_status_funs[p->status_current]();
.