lysdexic@programming.dev to Programming@programming.devEnglish · 1 year agoPush Ifs Up And Fors Downmatklad.github.ioexternal-linkmessage-square18fedilinkarrow-up138arrow-down15cross-posted to: rust@zorg.socialhackernews@lemmy.smeargle.fanshackernews@derp.foo
arrow-up133arrow-down1external-linkPush Ifs Up And Fors Downmatklad.github.iolysdexic@programming.dev to Programming@programming.devEnglish · 1 year agomessage-square18fedilinkcross-posted to: rust@zorg.socialhackernews@lemmy.smeargle.fanshackernews@derp.foo
minus-squareRyan@programming.devlinkfedilinkEnglisharrow-up3·edit-21 year 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.