3 ms·
> Anything worth vectorizing will be written in C/assembly. This isn't the way to go. Once you have to call an external function, you lose all compiler optimiz
by exDM69 11y ago
> Anything worth vectorizing will be written in C/assembly.
This isn't the way to go. Once you have to call an external function, you lose all compiler optimizations that might take place. If you write low level "primitive" operations (e.g. matrix multiply and inverse), you will get worse performance by doing external function calls rather than having your code made visible to the compiler so that it can be inlined and optimized.
Additionally, you can't write assembler SIMD code that is portable from architecture to architecture. This can be done in C using extensions but not if you stick to the standard (and support MSVC). Quite a lot of SIMD code can be written portably without having to use architecture specific instructions.
It's definitely a good thing that languages like Rust have native SIMD.