Hyperthreading


What is it?

It's a technique that allows a single CPU to execute multiple flows of control. It has multiple copies of the CPU hardware, such as programs counters and register files, while having only single copies of other parts of the hardware, such as the units that perform floating-point arithmetic.

What are the advantages?

A conventional processor requires around 20,000 clock cycles to shift between different threads, a hyper threaded processor decides which of its thread to execute on a cycle-by-cycle basis. This enables the CPU to take better advantage of its resources.

For example, if a thread must wait for some data to be loaded into a cache, the CPU can proceed with the execution of a different thread.

My current CPU is the Intel Core i7. It has 4 cores and the total threads it can execute in parallel is 8. That's because each core can execute two threads thanks to hyperthreading.