NfNitLoop/better-iterators

Improve parallelism

Closed this issue · 1 comments

For mapParUnordered, I yield all settled Promises before returning to filling the work queue. This means that, depending on where iteration pauses, there could be chunks of time where there are work slots available, but not running any tasks.

Should update that for better parallelism. Only yield one settled Promise at a time, then start refilling the pipeline. Could probably use partition to help simplify here. :)

This was completed in a4b0581 and released in v1.3.0