3 ms·
There's an insightful comment by GreenCat in the SetProcessAffinityMask documentation about how doing this in Windows is likely to hurt your performance: http:/
by Jach 14y ago
There's an insightful comment by GreenCat in the SetProcessAffinityMask documentation about how doing this in Windows is likely to hurt your performance: http://msdn.microsoft.com/en-us/library/windows/desktop/ms686223%28v=vs.85%29.aspx http://msdn.microsoft.com/en-us/library/windows/desktop/ms68...
In fact, this seems like a Prisoner's Dilemma problem with the OS having programs cooperate by default. There's a chance you'll speed up your application by locking it to a core (defecting), but only if none of the other applications try the same thing.
- Symmetry 14y agoRight. Setting the process affinity mask is a fine thing to do - if you're making these decisions for a specific piece of hardware with a specific set of programs running on it. It's madness for the OS or the person writing the software to try to do it for you, though.