The vast majority of the cost is memory allocation, so doing a first pass to see whether any upgrading is necessary at all, and thus avoiding allocation when it isn't, is a massive saving.