Back in the past there was something called hyperthreading where a single CPU core acted like two cores.

But is it possible to merge two CPU cores to an single one to improve performance on programs that doesn't use multiple cores decently? (from old games to the X Plane 11)

  • 2
    Short answer, no this is not possible to my knowledge. I wish there was too, I suffer from similar problems.
    – LPChip
    Oct 28 '18 at 12:16
  • 1
    Not unless you've got a really really really tiny soldering iron, & a steady hand...
    – Tetsujin
    Oct 28 '18 at 12:24
  • @Tetsujin someone send this idea to the Intel quickly then make combustible lemona Oct 28 '18 at 12:25
  • 4
    A "core" is a physically distinct part of the system; at a very rough level, having 2 cores on one processor chip is about the same as having 2 separate 1-core chips. With that analogy, it should be clear you can't merge them,
    – dave
    Oct 28 '18 at 13:15
  • 2
    A "thread" is a "thread of execution", which is to say, there is exactly one instruction-processor ("core") executing a stream of instructions at any one instant of time, If you want to use two cores you need (at least) two threads; that is one of the reasons for inventing threads.
    – dave
    Oct 28 '18 at 18:28

Short answer: No.

Somewhat longer answer: Cores on a multicore chip are basically separate physical processors. Hyperthreading allows you to split one physical core into, e.g., two threads. The advantage of this is that the single core can swap back and forth between threads so that when one thread is waiting (for I/O, for example) the other thread can be resumed. Two threads on one hyperthreaded core share resources, allowing for very efficient context switching between threads.

So why can't you do the opposite? Well, just picture it. You have two physical cores but only a single process. There are two possible scenarios:

  1. The executing code can be run in parallel. In this case, you would just have two threads, one for each core. This way, both threads can run at the same time.

  2. The executing code cannot be run in parallel. This is what you are asking about. In this case, you have a single thread. Because the code cannot be run in parallel, you can't run it on two separate processors at the same time. To run a single thread on both cores you would simply be switching the thread back and forth between the two cores. This would yield no performance gain, and in fact would hurt performance due to unnecessary context switches.

This is an unfortunate downside of multicore systems; you only see a performance gain when the application can perform multiple tasks in parallel and is written to do so. Even then, the gain is not directly proportional to the number of cores (see Amdahl's Law).

  • 1
    "you only see a performance gain when the application can perform multiple tasks in parallel and is written to do so" - Or in multi-tasking, i.e. having two single-threaded programs operate on separate cores, such that performance is 'improved' because no one program has to 'wait' for another to progress.
    – Robotnik
    Jun 6 '19 at 3:51

No, not really

You would have to parallelize the instructions in any way and many of them depend on the results of other instructions [1]. In addition to that, the arithmetic unit (the brain, that is really calculating) isn't usually the bottleneck.

To access and compute data they have to be stored. To make this fast, there are multiple memory layers (registers, Cache (Level 1,2,3), RAM). Two Cores (in an x86 processor) usually are only sharing the RAM (and maybe a L3 Cache). So you cannot simply split a program, because the other half would have the data it needs.

How Hyperthreading works

Hyperthreading is taking advantage of the time, the computing unit is waiting for something else.

It takes a long time to load a value from the e.g. RAM (AFAIK anywhere around 500 CPU Cycles). In this time, when the arithmetic unit normally wouldn't do anything, Hyperthreading runs the second process on the same core.

[1] That is also the point, where speculative execution tries to help. And maybe create some security holes (Spectre and Meltdown)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.