I noticed that several of my multi-threaded calculations work faster if I disable hyperthreading in the BIOS.
I also found out that I can programmatically disable the (logical) CPU: s by changing the affinity of the processor to the current process, for example, as in C #:
// using System.Diagnostics; var current = Process.GetCurrentProcess(); var affinity = current.ProcessorAffinity.ToInt32(); current.ProcessorAffinity = new IntPtr(affinity & 0x5555);
At least in terms of performance, disabling every second (logical) processor by changing the affinity for the processor has the same effect as completely disabling the hyperflow?
Anders gustafsson
source share