Creating threads significantly improves the performance of a program, but there is an upper threshold, beyond which if we create any more threads then the performance degrades, due to context switching.
Is there any way or formula, using which if all the hard-ware details required are know then one can find out the number of thread which would give the best performance??
It can be done experimentally, but I am looking at something faster, if some way one can have a educated guess, that's all.
Thanks,