3 ms·
This is really neat, but when a thread/process state enables MMX/SSE/AVX registers, it increases the cost of context switching (on Linux and other OSes) because
by DiabloD3 9y ago
This is really neat, but when a thread/process state enables MMX/SSE/AVX registers, it increases the cost of context switching (on Linux and other OSes) because they only restore registers they know could have been use (ie, if it has not called MMX/SSE/AVX ops yet, it does not save/restore XMM/YMM/ZMM registers).
There have been cases where autovectorization in compilers have produced good SIMD versions of code (which is still considered a hard thing to do in some cases), but was still slower during certain benchmarks that did high thread counts (ergo, absurd amounts of CPU time wasted on context switching), but beat non-vectorized in less loaded situations.