Performance/Parallel

From HaskellWiki
Jump to navigation Jump to search

Tips and tricks for better multicore parallel performance from your Haskell.

Which GHC version to use

The recommended version of GHC for parallel programming at the moment (Apr 2009) is GHC 6.12 (aka the HEAD branch of GHC), which has had extensive tuning.

Affinity

Parallel GC

Using n-1 cores

GHC has parallel garbage collection since 2007 already. However, recent work showed that this parallel GC sometimes hampers performance, based on various factors, in particular on Linux systems. See this thread for more: http://www.haskell.org/pipermail/glasgow-haskell-users/2009-April/017050.html

Sparks

Data Parallel Arrays

Tool Support

Tools for parallel performance tuning:

ThreadScope
GHC (HEAD 2009) supports a visual post-mortem analysis, and a graphical tool "ThreadScope" has been developed by Satnam Singh and others.