News for hackers. Stuff that matters.
Re:Push ifs up and fors down by vjk800 on Thursday November 16, 2023 @02:26AM (#38286654)
I'm surprised by how often programmers coming from software engineering background do this wrong. I started programming in science and there it's absolutely necessary to think about this stuff. Doing for loops in a wrong order can be the difference between running your simulation in one hour instead of one week.

With this background, I instinctively do small-time optimization to all my codes by ordering for's and if's appropriately. Code that doesn't do this right just looks wrong to me.

Re:Push ifs up and fors down by crabmusket on Thursday November 16, 2023 @02:37AM (#38286720)
Watch out for a visit from the premature optimisation police!
Re:Push ifs up and fors down by topaz0 on Thursday November 16, 2023 @10:46AM (#38290983)
I try to avoid the premature optimisation police just as much as the regular police. Neither of them tend to be serving the public interest, whatever they may say.