0

Lets say we do some processing on an [n][m] matrix.

Is there a way to determine the ideal number of subtasks for parallel processing?

For example, given this [n][m] matrix, I can create n*m threads, n threads, m threads or some sized block... How would one know which is most efficient?

idk
  • 3
  • 5

1 Answers1

0

the optimal number of workers is found by experimentation, this depends on the algorithm, the CPU, the RAM transfer speed, the OS and the orientation of the sun (thermals), so people plot the time it takes to finish the task against the number of workers and find the best number to use.

you can refer to this answer for a chart showing such results. Optimal number of threads per core

Ahmed AEK
  • 8,584
  • 2
  • 7
  • 23