How many cores does a Mid 2012 Macbook Air have?
I checked the specs, and the i5-3427U CPU has 2 cores.
But the Activity Monitor shows 4 little charts for the CPU, so it looks like 4 cores.
Which is correct? Why does the Activity Monitor have 4 charts?
Your computer has 2 cores, but 4 logical processors. What you are seeing is Intel's hyper-threading technology. This technology puts multiple logical processors on a single core, so that each core can run multiple threads at once.
The difference between this and multiple cores is that hyper-threading only duplicates the parts of the processor which control the current state, not the actual execution unit, but multiple cores duplicate everything. This means that your computer will run like it has four cores only if the threads on each core are using different parts of the execution unit, but if the exact same thing was running on both threads in a single core, it wouldn't be any faster than a two-core system without hyper-threading.
To find for sure how many cores you have is by opening a terminal (e.g via Spotlight and searching for Terminal) and then run
system_profiler | less
it'll dump out a bunch of info. Look for the category called "hardware" (which is close to the top of all the info) and an entry called "Total Number of Cores". There you will find your answer.
If you don't want to browse through all the output, a simple
system_profiler | grep 'Total Number of Cores'
gives you the result directly.
Or use the "About this Mac" (Apple icon in top left) > more info
> system report
, that shows how many cores you have.
Here's a Terminal command that directly outputs how many cores you have:
sysctl hw.ncpu
If you care to distinguish between logical cores and physical cores, these are also available:
sysctl hw.physicalcpu
sysctl hw.logicalcpu
Source: https://stackoverflow.com/questions/1715580/how-to-discover-number-of-logical-cores-on-mac-os-x