News for hackers. Stuff that matters.
Re:Push ifs up and fors down by Vt71fcAqt7 on Thursday November 16, 2023 @07:47AM (#38288909)
The way he explains "pushing `fof`s down" is obvious. Restating it would be: only do something you need in a for loop and not something you could do once. But that has nothing to do with what he means by "pushing `if`s up" which is about making `if`s appear es early as possible in the control flow. It doesn't matter if `for`s are early or late in the control flow. What matters is that only things that need to be done n times with n being the loop count of the for loop are in the for loop and everything else is not. And I disagree with "push ifs up" stated unqualified.

There are no comments on this comment yet.