Day 21 of Advent of Compiler Optimisations!

Summing an array of integers? The compiler vectorises it beautifully, processing 8 at a time with SIMD. Switch to floats and... the compiler refuses to vectorise, doing each add one by one. Same loop, same code structure — why does the compiler treat floats so differently?

Read more: xania.org/202512/21-vectorisin
Watch: youtu.be/lUTvi_96-D8

0

If you have a fediverse account, you can quote this note from your own instance. Search https://hachyderm.io/users/mattgodbolt/statuses/115757816470759311 on your instance and quote it. (Note that quoting is not supported in Mastodon.)

0