Which is more costly in terms of performance: a few threads with many context switches or many threads with few context switches?
Assuming that the CPU can process one thread at a time:
In Case 1 with 3 threads and 300 context switches, each thread is context switched an average of about 100 times,
In Case 2 with 300 threads and 1 context switch per thread, the total number of switches is also 300.
So which one is more performance-intensive?"