3 ms·
Surely they can check if AVX is enabled and use the intrinsic if so?
by snovv_crash 7y ago
Surely they can check if AVX is enabled and use the intrinsic if so?
- ncmncm 7y agoThat would involve changing code not touched since before AVX or even SSSE3 existed. Probably not even since before amd64 existed. But it's hard to switch on use of a single instruction. Checking at the use site consumes a branch predictor slot. Switching in a function pointer interferes with inlining. Self-modifying code would have been the old way. The modern way might be rewriting in the linker or loader, or JIT compiling. I have discovered that compilers are extremely bad at recognizing hand-coded byte-order swapping and dropping in movbe or bswap instructions. That Gcc and Clang recognized ham-handed pop counting loops seems miraculous now.