It is known that modern CPUs have both Performance cores (P-cores) and efficiency cores (E-cores), different types of CPU cores that have different purposes and are designed for different tasks. P-cores typically have higher clock speeds and designed for high-performance tasks, while E-cores operate at lower clock speeds and focus on energy-efficient processing. In MATLAB, maxNumCompThreads returns the current maximum number of computational threads. Currently, the maximum number of computational threads is equal to the number of physical cores on your machine. How MATLAB makes the distinction between P-Cores and E-Cores ?
Kshitij Singh answered .
2025-11-20
MATLAB relies on the underlying operating system and hardware-level information to determine and utilize CPU resources, including Performance cores (P-cores) and Efficiency cores (E-cores) in modern CPUs. Here's how MATLAB handles this situation and what distinctions it makes:
parfor, parfeval, and matrix operations in BLAS (Basic Linear Algebra Subprograms), depend on available computational threads.maxNumCompThreads, MATLAB retrieves the maximum number of threads the OS allows for MATLAB's computation. However, it does not explicitly distinguish between P-cores and E-cores.
pool = parpool; % Start a parallel pool numWorkers = pool.NumWorkers; % Number of parallel workers
If you need to explicitly target specific cores, you would need to use platform-specific tools:
taskset to bind processes to specific cores.However, this is outside MATLAB's built-in capabilities and requires external configuration.