I made some times ago this to retrive the p-core (I think is similar to that used in the post from @Anders Melander ) :
use Windows.System.SystemInformation; //this come from WINMD (getit)
//Result = 0 --> No Hybrid system
//Result = -1 --> DIFFERENT RECORD LENGTH (API VERSION OLD OR NEW)
//Result = -2 --> API Error
//Result > 0 --> mask with Power Core (no more than 63 core, or the result type should be change)
//Tested only with Intel x64 CPU (no Xeon, no Numa system)
function GetCPUPowerArray: INT64;
var CPUInfoSet: TArray<SYSTEM_CPU_SET_INFORMATION>;
dwlengthsize: ULong;
begin
Result := 0;
dwlengthsize := 0;
setlength(CPUInfoSet, 0);
GetSystemCpuSetInformation(nil, 0, dwlengthsize, 0, nil);
if (dwlengthsize <= 0) then
begin
Result := -2;
exit;
end;
if ((dwlengthsize mod sizeof(SYSTEM_CPU_SET_INFORMATION)) <> 0) then
begin
Result := -1;
exit;
end;
setlength(CPUInfoSet, dwlengthsize div sizeof(SYSTEM_CPU_SET_INFORMATION));
GetSystemCpuSetInformation(@CPUInfoSet[0], dwlengthsize, dwlengthsize, 0, nil);
for var i := Low(CpuInfoSet) to High(CpuInfoSet) do
if (CpuInfoSet[i].CpuSet.EfficiencyClass > 0) and (i < (sizeof(INT64)*8 -1)) then
begin
Result := Result or (1 shl i);
end;
setlength(CPUInfoSet, 0);
end;