Why does hyperthreading increase CPU performance?

566 views

I am not able to get this.

Lets say that 1 cpu core takes 1 second to do 1 operation and it requires full focus on that 1 task to finish it in 1 second. So, in this case a 4 core cpu will do 4 operations per second. How does hyperthreading increase it to 5 or 6 tasks per second.

Where is the extra power coming from?

In: Technology

6 Answers

Anonymous 0 Comments

The CPU isn’t a single unit, each core is actually multiple blocks

If I give you an array of 10 numbers and tell you for each item in that array first add 4, then multiply by 3. If we’re restricted to a single operation at a time then you have a lot of wasted time because the adder is empty when you’re multiplying and the multiplier is empty when you’re adding

Superscalar architecture works to split instructions so that it can keep the blocks busier so while its multiplying for the first item its adding for the second so that nothing is empty

But in real programs you often won’t be filling all the blocks all the time. Hyperthreading lets two different programs run on the core at the same time with their own memory so they don’t get jumbled, this does an even better job of ensuring that all of the blocks are doing something as much as possible.

Consider cooking a large meal with a meat and a sauce and a pasta. Do you cook the meat in a pan, finish it, then the sauce in another, then the pasta or can you cook all three on the stove at the same time? You have spare pans and burners, but you need the capacity to focus on multiple things in succession, that’s what hyperthreading gives the CPU

You are viewing 1 out of 6 answers, click here to view all answers.