2

Since Mathematica 7.0, there is ParallelTry function [1] that evaluates multiple functions in parallel, returning the first result received. This is similar to parallelizing a search on a disjoint data structure. Another common use-case is running multiple algorithms for a given problem and waiting for the first result to be returned.

The question is whether there is a good name for this style of computation. I can only think of calling this Eureka style where one of the functions (tasks) finding the result exclaims a eureka!

[1] http://reference.wolfram.com/language/ref/ParallelTry.html

1 Answer 1

1

This is called "speculative parallelism". The processor/system runs some parallel thread, speculating it will produce a useful answer; if it does not (for ParallelTry), it is aborted with no effect on the machine state and the non-speculative part (for ParallelTry, the computation that succeeded first) produces the answer.

Sign up to request clarification or add additional context in comments.

3 Comments

While the need to abort a computation is common, I feel speculative parallelism also has the following associated notion. It requires the undoing effects of a speculated computation if it is discovered that the prediction was wrong and such an execution was unnecessary. There is no such undo notion involved in ParallelTry. Do you agree?
I agree that speculated and failed thread has its side effects undone; otherwise it wouldn't be "speculative". I'm under the (mistaken?) impression the ParallelTry aborted threads have their state undone. (I'm not an expert on this construct.)
If ParallelTry doesn't abort/undo state changes of the losers, then this scheme is just a signalled event.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.