Thursday, September 14, 2006

Parallel Haskell

Because functions have no side effects in Haskell, it seems to be an ideal language for automatic parallelization. With the increasing prevalence of multicore processors, more people will have access to parallel machines.

There is the somewhat straightforward way to parallelize, where map and the nondeterminism monad are parallelized. This can be enhanced by programmer hints or dynamic run-time measurements.

One can speculatively evaluate thunks on the side in hopes it may be needed in the future. This requires a run time to guess, through measurement, which thunk to evaluate, and preemptively stop it if it is taking excessive CPU, memory, or other resources.

No comments :