3 ms·
> runtime feature detection For any code that's meant to last a bit more than a year, I would say that should also include runtime benchmarking. CPUs change, c
by magicalhippo 2y ago
> runtime feature detection
For any code that's meant to last a bit more than a year, I would say that should also include runtime benchmarking. CPUs change, compilers change. The hand-written assembly might be faster today, but might be sub-optimal in the future.
- mort96 2y agoThe assumption that vectorized code is faster than scalar code is a pretty universally safe assumption (assuming the algorithm lends itself to vectorization of course). I'm not talking about runtime selection of hand-written asm compared to compiler-generated code, but rather runtime selection of vector vs scalar.