Even better: Do a binary chop instead of a linear search (ie. start in the middle)
Yeah, this also surprised me why using linear search?
. With 50k counts just one measurement at mid-range it is enough to fully determine the required range, imho. So, no need for search most of the time.
I was also thinking about a dedicated comparator that would just "know" which range is needed. But it might be possible to just activate a high sample rate at an overload event (if available, the manual says max sample rate is 5 samples/s, but there might be a higher rate at reduced resolution).
I'd also try to align numbers to the left so when it down-ranges it would just display extra digits of resolution at right.