Comment by Mystery-Machine
Comment by Mystery-Machine a day ago
Terrible advice. It's the exact opposite of "Tell, don't ask".
Performance of an if-statement and for-loop are negligent. That's not the bottleneck of your app. If you're building something that needs to be highly performant, sure. But that's not the majority.
Performance of any given CPU instruction is negligible, yet somehow they accumulate to noticeable values.