6 ms·
Excuse me if this sounds stupid but, vector instructions are assembly. I know we can use inline assembly or compile and link assembly alongside C but isn't it t
by Qu3tzal 8y ago
Excuse me if this sounds stupid but, vector instructions are assembly. I know we can use inline assembly or compile and link assembly alongside C but isn't it the compiler that is in charge of using vector instructions ?
IIRC GCC has -mmx, -sse(2|3|4) options to enable this kind of instructions.
- WoodenChair 8y agoSure, if the compiler can find optimizations by inserting vector instructions, it will. But, typically you'll want to specifically format your code using matrices/a library like BLAS to maximize performance and use as many vector instructions as possible.