Hello,
I have a macOS application which can utilize several CPU cores at the same time. For optimal performance, I need to know the number of CPU cores at runtime. On Intel-based Macs it was possible to get the number of available cores by running sysctl hw.ncpu
.
Now on Apple Silicon SoCs, sysctl hw.ncpu
returns the total count of performance and efficiency cores. This is problematic for me since I need to use the performace cores only. Using the performance and efficiency cores at the same time causes the performance cores to run at the same speed as the efficiency cores (which is very slow).
Is there some way to detect the number of performance cores at runtime?