SN-1858 已核对来源,附原文与上下文。
是在 AMD 上快 2 倍、在 Intel 上只有 1/2 速度吗?
Is it 2x fast on AMD and 1/2 fast on Intel?
其他参与者原话tcatm原帖 ↗顺便问下,__attribute__ ((aligned (16))) 就能让编译器在编译期对齐,你为什么还要用 alignup<16> 这个函数?
Btw. Why are you using this alignup<16> function when __attribute__ ((aligned (16))) will tell the compiler to align at compiletime?
试过,但它对栈上的东西不管用。我跑过一些测试。
Tried that, but it doesn't work for things on the stack. I ran some tests.
它连错误都不报,就是对齐不了。
It doesn't even cause an error, it just doesn't align it.