The first smartphones with dual-core processors reached the market in 2010. Before that smartphones used single-core processors maxing out at around 1.4GHz. Since then the number of cores has grown and the norm today is eight cores, however, six-core and four-core processors are still used.

Ignoring (for a moment) the Heterogeneous Multi-Processing (HMP) aspects of these processors via tech like big.LITTLE and DynamIQ, today’s smartphones have up to eight individual CPUs which can independently run tasks inside their own virtualized memory space. Eight engines, ready and able to run your apps. But why? Why use multi-cores in the first place? What are the advantages and disadvantages? Let me explain!

## Single-core vs multi-core processors, explained

On mobile, power efficiency is paramount. While chipmakers are striving for grater importance, the constraints of running in a thermally limited environment, from a battery, can never be removed. The power that a mobile processor uses is determined by three main factors. The capacitance of the circuits, the voltage of the circuits and the clock frequency. The exact formula is P=CV2f. Up the frequency and you increase the power usage. Alter the voltage and the power level changes dramatically (since it is Voltage2).

What is an SoC? Everything you need to know about smartphone chipsets

If we start a hypothetical single-core processor, we can insert “1” for each of the values, so C is 1, V is 1, f is 1. This is a mathematical exercise, not a real-world example. The total power used is 1. To see the relationship between a dual-core processor and a single-core processor we can now insert the rough values for a dual-core processor, but one running at half the clock frequency. The capacitance goes up because there is more circuitry. Going from single-core to dual-core could alter the C from 1 to 2, but we will use 2.2 to cover any other miscellaneous circuitry and change that using dual-core implies. The voltage can go down, as the frequency will be lower. To err on the side of caution, we will set the voltage to 0.6. Finally, the frequency — this will be half of the original single-core processor, so 0.5. P = 2.2 * 0.62 * 0.5. Do the math and P = 0.396, in other words, 0.4.

In terms of raw processing power, this dual-core processor can perform the same number of calculations as a single-core processor running at twice the clock speed, but as you can see it uses 60% less power. That is the attractiveness of multi-core solutions.

## The Raspberry Pi experiment

To test the hypothesis that a half-speed dual-core processor can compute at the same levels as a single-core processor running at “full-speed,” I used a Raspberry Pi and a prime number benchmark that I wrote. The advantage of the Raspberry Pi is that you can disable and enable cores, as well as alter the clock frequency of those core. That makes it perfect for testing out this theory.

Using my test tool to calculate the primes up to 5,000,000 using two threads (meaning it will run on two cores simultaneously), a normal Raspberry Pi 4 can complete the task in 12 seconds. This is our baseline. Now running the same test with just one core activated, but still two threads running, the Pi completes the task in 24 seconds. Since there is no longer a second physical core for the program to use, all the calculations happen on the only active core and it takes twice as long.

Then I activated an additional core, but dropped the clock frequency from 1.5GHz (the default) to just 750MHz. So, two cores running at half the speed. The test completes in 24 seconds. This means that the test completes in the same time when using a single core at 1.5GHz and when using two cores at 750MHz. But the dual-core example used 60% less power.

The tests didn’t actually finish in 24.0 seconds each, there was a fraction of a second difference between the two test runs. I start a long test, one that would take over three minutes to complete. Running that test in the same way as above, I found that a single-core processor running at 1.5GHz is fractionally slower than a dual-core half-speed configuration. Over three minutes the dual-core setup is faster by 1.5 seconds, which is less than 1%. A small difference, but interesting to note.