3 ms·
Like much of the advice "it depends" and "measure it". Basically hyper-threading shares a whole load of resources between threads. If your code ends up contend
by owlbite 3y ago
Like much of the advice "it depends" and "measure it".
Basically hyper-threading shares a whole load of resources between threads. If your code ends up contending on those resources you probably run slower. If your code is blocked due to lack of instruction-level parallelism, it probably runs faster. Generally an expert-optimized numerical code (e.g. machine learning) is going to fall into the first camp as it's pretty easy to kill the ILP bottlenecks in that sort of code.