Hardware-Aware Coding: CPU Architecture Concepts Every Developer Should Know (blog.codingconfessions.com)
from abhi9u@lemmy.world to technology@lemmy.world on 23 Mar 11:45
https://lemmy.world/post/27277998

#technology

threaded - newest

ElPussyKangaroo@lemmy.world on 23 Mar 13:25 next collapse

What about Claude-Aware coding tho? /s

call_me_xale@lemmy.zip on 23 Mar 16:34 next collapse

Can we just not with the AI-generated illustrations?

pixeltree@lemmy.blahaj.zone on 23 Mar 17:56 collapse

TL:DR: minimize randomness, group variables by access frequency, and unroll loops if your compiler doesn’t do that already

call_me_xale@lemmy.zip on 23 Mar 19:46 next collapse

tl;dr tl;dr: use a modern compiler.

Lionel@endlesstalk.org on 23 Mar 20:56 next collapse

Is it worth reading

bejean@lemmy.world on 23 Mar 21:57 collapse

Do any compilers NOT unroll loops in high optimization modes? I was under three impression this was usually unnecessary.

pixeltree@lemmy.blahaj.zone on 23 Mar 23:22 next collapse

No clue, I was just frustrated with how much useless extended metaphor was in the article and thought I’d save people some time

InverseParallax@lemmy.world on 24 Mar 01:09 collapse

Really depends on the target, llvm goes between unrollimg and vectorizing cleanly, to unrollimg to a ludicrous degree, to refusing to unroll period.

Some of it is subtarget specific, but sometimes it’s just weird.

Gcc is evil incarnate, all it’s passes are at war with each other, loop Canon form often broke vectorization and even unrolling period.