logoalt Hacker News

chillitomtoday at 4:26 AM1 replyview on HN

Initial example takes array pointers without the __restrict__ keyword/extension so compiler might assume they could be aliased to same address space and will code defensively.

Would be interesting to see if auto vec performs better with that addition.


Replies

chillitomtoday at 4:36 AM

Also trying to let the compilers know that the float* are aligned would be a good move.

auto aligned_p = std::assume_aligned<16>(p)

show 2 replies