4 ms·
Nothing prevents compilers from compiling in multiple paths for anything performance critical. That's how it's already being done on x86. If AVX-512 is availab
by vardump 4y ago
Nothing prevents compilers from compiling in multiple paths for anything performance critical.
That's how it's already being done on x86. If AVX-512 is available, use it. If not, maybe fall back to AVX-2. Else fall back to SSE2. Etc.
GCC multiversioning:
https://gcc.gnu.org/wiki/FunctionMultiVersioning https://gcc.gnu.org/wiki/FunctionMultiVersioning
Clang multiversioning:
https://clang.llvm.org/docs/AttributeReference.html#cpu-dispatch https://clang.llvm.org/docs/AttributeReference.html#cpu-disp...