logoalt Hacker News

cmovqtoday at 8:04 AM1 replyview on HN

Compilers can’t really, in a meaningful way, change the layout of your data in memory. And you do need to think about your memory layout to get any benefit from SIMD. You’ll notice a lot of compiler auto vectorization insert many instructions just to shuffle data around to get to a usable layout, which negates much of the benefit.


Replies

fulafeltoday at 8:51 AM

Depends on the programming language. A good question is why we don't have more optimizable languages in mainstream use.

show 2 replies