Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Current status of automatic parallelism in Haskell [duplicate]

Possible Duplicate:
What's the status of multicore programming in Haskell?

What is the status especially in GHC? Is it popular yet, or still being experimental?

How careful/fine-grained is the compiler in deciding when and how to parallelize? Does the run-time choose the threadpool's size appropriately or we have to specify through command line?

like image 732
Phil Avatar asked Jan 15 '11 18:01

Phil


3 Answers

The long answer is the paper linked in Don's response. The short answer:

  1. GHC does not automatically parallelise your program.

  2. However, it makes it very easy to introduce parallelism via the par combinator. The higher-level interface to this are the "strategies" Don mentioned.

  3. Whether simply adding par will speed up your program depends very much on your algorithm. The upside is, there are no gotchas -- you can't introduce deadlocks or races (unless you're cheating the type system).

like image 72
nominolo Avatar answered Sep 19 '22 14:09

nominolo


GHC's current scheduling, thread pool and migration policies are described in the paper "Runtime Support for Multicore Haskell". The "strategies" style semi-automatic parallelism is quite widely used, at the time of writing.

like image 43
Don Stewart Avatar answered Sep 21 '22 14:09

Don Stewart


Perhaps by "automatic parallelism" you meant Data Parallel Haskell? As far as I have seen the most current information about this project is available in a video presentation by Simon Peyton Jones, from April 2010.

like image 43
Tom Crockett Avatar answered Sep 20 '22 14:09

Tom Crockett