Previous | Next --- Slide 41 of 52
Back to Lecture Thumbnails
coffee7

Assuming we are working on the GHC machines which have 8 cores and 2 hyperthreads/core, we want to have at least 16 tasks so that each execution context on each core will have a task to work on. If we have many small tasks, we are able to improve the load balance because one thread won't be stuck with a block that is bright and takes a long time to compute.

muchanon

It is also important that the number of tasks you create is not significantly higher than the amount of parallelism in your system. This will create unnecessary overhead.