The implementation is just
bool QAbstractItemModel::hasIndex(int row, int column, const QModelIndex &parent) const
{
if (row < 0 || column < 0)
return false;
return row < rowCount(parent) && column < columnCount(parent);
}
and yet it features as the most prominent part of the profile,
encompassing up to 25% of refresh()
Open-coding it makes refresh() 40% faster. Measurements from between
after wallet.get_full_history() and return from refresh()
Before:
1.8637257907539606
1.8563996930606663
1.7696567592211068
1.8933695629239082
After:
1.3133591176010668
1.3686819169670343
1.2470976510085166
1.2455544411204755