Rohan Warang writes an article that concentrates on how to optimize multithreading on multi-core CPUs. Here is an excerpt.
“To arrive at a conclusion as to how many threads should be declared for a doing the same task, a small console application which records the CPU time for each thread is shown below. We will try to determine if we get higher performance when we declare threads equal to the processor count or greater than the processor count.
We record the time for multiple threading scenarios. Processor count is used to determine how many concurrent threads should be tested. If processor count is āNā we determine result for threads in range from N-1 to N+2 concurrent threads.”


