ColinE
ColinE

Reputation: 70142

Xcode shows up to 400% CPU Usage - but iPhone is only 2-core

The following shows a screenshot of the Xcode CPU Report indicating that my application (while number crunching) is maxing-out one of the CPUs:

CPU at 100

The above shows a maximum of 400%. However the iPhone has a 2-core CPU, so I am wondering why the gauge doesn't go to 200% instead?

Furthermore, by using concurrency and splitting my number crunching across multiple threads I can max out at 400%, however my algorithm only runs twice as fast. Again, indicating that the work is divided across 2 CPU Cores.

Does anyone know why Xcode shows 400% and how this relates to the physical hardware?

Upvotes: 2

Views: 684

Answers (2)

gnasher729
gnasher729

Reputation: 52566

The iPhone has only 2 cores (although some iPads have more). The Mac running the simulator apparently has four, or two plus hyper threading.

Upvotes: 0

iHulk
iHulk

Reputation: 4909

If you are testing in a simulator then it shows reports on the basis of your MAC's processor that's why it is showing 400% ( for a quad-core processor).

Upvotes: 3

Related Questions