3 ms·
This very much depends on what the threads are doing. Like some others have mentioned, threads are sometimes an abstraction of context and sometimes a CPU. TH
by ezy 14y ago
This very much depends on what the threads are doing. Like some others have mentioned, threads are sometimes an abstraction of context and sometimes a CPU. THere is no pat answer -- unless you're doing only one kind of thing -- if you're all IO bound or all CPU bound, the answer is obvious, otherwise...
I worked on a platform that could have 200+ threads running through it, but in areas of the code where it mattered, only NCPU+epsilon threads were allowed to do intense CPU-bound work. Doing this, as you might expect, improves performance substantially when the system is loaded, while at the same time allowing one to use threads as an abstraction of context in the non-CPU bound areas of the code.