abhi9u@lemmy.world to Technology@lemmy.worldEnglish · 21 days agoHardware-Aware Coding: CPU Architecture Concepts Every Developer Should Knowblog.codingconfessions.comexternal-linkmessage-square3fedilinkarrow-up14
arrow-up14external-linkHardware-Aware Coding: CPU Architecture Concepts Every Developer Should Knowblog.codingconfessions.comabhi9u@lemmy.world to Technology@lemmy.worldEnglish · 21 days agomessage-square3fedilink
minus-squarepixeltree@lemmy.blahaj.zonelinkfedilinkEnglisharrow-up1·20 days agoTL:DR: minimize randomness, group variables by access frequency, and unroll loops if your compiler doesn’t do that already
minus-squarebejean@lemmy.worldlinkfedilinkEnglisharrow-up1·20 days agoDo any compilers NOT unroll loops in high optimization modes? I was under three impression this was usually unnecessary.
minus-squarecall_me_xale@lemmy.ziplinkfedilinkEnglisharrow-up1·20 days agotl;dr tl;dr: use a modern compiler.
TL:DR: minimize randomness, group variables by access frequency, and unroll loops if your compiler doesn’t do that already
Do any compilers NOT unroll loops in high optimization modes? I was under three impression this was usually unnecessary.
tl;dr tl;dr: use a modern compiler.