YAXArrays.jl
YAXArrays.jl copied to clipboard
Should we use `@threads :greedy` for the innerloop threading?
According to the documentation of @threads this is the scheduler that would work best for non-uniform running times in different threads.
:greedy scheduler spawns up to Threads.threadpoolsize() tasks, each greedily working on the given iterated values as they are produced. As soon as one task finishes its work, it takes the next value from the iterator. Work done by any individual task is not necessarily on contiguous values from the iterator. The given iterator may produce values forever, only the iterator interface is required (no indexing).
This scheduling option is generally a good choice if the workload of individual iterations is not uniform/has a large spread.