Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This adds a very rudimentary, top-level version of the async/await parallelization pattern. Here is a demo:
The main benefit of this pattern is simplicity, requiring adding as little as two words to make a computation run in parallel. Specifically, the advantage over
parallelApply
is that you don't need a host of new functions, instead you can turn existing functions parallel. More examples and good practices are here.Here are some more examples of instantly turning all/any/position parallel:
@d-torrance: I'd like to know whether
parallelApply
, which is more complicated, has specific benefits or guardrails that are missing from the first example above. I imagine if I had a massive example this might crash and burn, but short of examples like the typo in #3439, I haven't seen any drawbacks.The next steps are: