Name for programming pattern used by Mathematica

70 Views Asked by At

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

There are 1 best solutions below

3
On

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.