How to find the Number of physical CPU Cores (not logical SMT hyperthreads) via .NET Core?
问题 I want to detect the number of real physical cores, not logical cores, for workloads that scale negatively when more threads compete for private per-core caches, and/or have high enough IPC that running more than one logical thread per core doesn't increase throughput by more than the increase in threading overhead, especially for problems that don't scale perfectly to lots of cores. Or to put it another way, the number of threads that can run without any of them competing for execution