lysdexic ( lysdexic@programming.dev ) to Programming@programming.devEnglish · 3 years agoPush Ifs Up And Fors Downmatklad.github.ioexternal-linkmessage-square22linkfedilinkarrow-up139cross-posted to: hackernews@derp.foo
arrow-up139external-linkPush Ifs Up And Fors Downmatklad.github.iolysdexic ( lysdexic@programming.dev ) to Programming@programming.devEnglish · 3 years agomessage-square22linkfedilinkcross-posted to: hackernews@derp.foo
minus-squareRyan ( declination@programming.dev ) linkfedilinkEnglisharrow-up5·3 years agoModern optimizing compilers are magical. I would need to check assembly but I would actually expect the if to be hoisted out of the loop entirely to relieve pressure on the branch predictor.
Modern optimizing compilers are magical. I would need to check assembly but I would actually expect the if to be hoisted out of the loop entirely to relieve pressure on the branch predictor.