Cache GetSystemInfo.dwNumberOfProcessors.
GetCPUCount
is very slow (unlike GetCurrentProcessId
); it takes 1.6~2 μs on my computer because its inner GetSystemInfo
does several syscall
s. While it shouldn’t matter (unless...), it’s unpleasant.
GetCPUCount
is very slow (unlike GetCurrentProcessId
); it takes 1.6~2 μs on my computer because its inner GetSystemInfo
does several syscall
s. While it shouldn’t matter (unless...), it’s unpleasant.