Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Automatic parallelism is not as easy as it might seem. The problem with this is that if partitioning is done automatically, there's the risk of overpartitioning (too many partitions), which would add too much overhead, or underpartitioning, which would not take proper advatange of all the cores in your CPUs. Figuring this out statically (i.e. at compile-time) is quite difficult, which is why it's usually left to the developer to annotate <em>where</em> to parallelize.</p> <p>Examples:</p> <p>Haskell has the <a href="http://haskell.org/ghc/docs/latest/html/users_guide/lang-parallel.html" rel="nofollow noreferrer"><code>par</code> combinator</a>, which serves as an annotation to create a <em>spark</em>, a computation that is turned into a thread when a CPU core becomes available.</p> <p><a href="http://www.haskell.org/haskellwiki/GHC/Data_Parallel_Haskell" rel="nofollow noreferrer">Data Parallel Haskell</a>: defines a parallel array data type to allow a more implicit style of parallelization but it seems to come at the cost of some limitations, and is still experimental code.</p> <p>(<em>disclaimer: I'm not a Haskell developer</em>)</p> <p>The <a href="http://msdn.microsoft.com/en-us/library/dd460717(VS.100).aspx" rel="nofollow noreferrer">Task Parallel Library in .NET</a>: can do automatic parallelization of data, or you can implement your own <a href="http://msdn.microsoft.com/en-us/library/dd381768(VS.100).aspx" rel="nofollow noreferrer">Partitioner</a>. You still need to know how parallelization works, or you'll end up with <a href="http://blogs.msdn.com/pfxteam/archive/2010/01/05/9944172.aspx" rel="nofollow noreferrer">over- or underpartitioning</a>. Reed Corpsey has a <a href="http://reedcopsey.com/category/algorithms/parallelism/" rel="nofollow noreferrer">great series of articles on the TPL and PLINQ</a>.</p> <p><a href="http://research.microsoft.com/en-us/projects/DryadLINQ/" rel="nofollow noreferrer">DryadLINQ</a> builds on PLINQ and adds automatic distributed computing.</p> <p>None of these are really native to the the language, but they're tightly integrated. There's even a <a href="http://fsharppowerpack.codeplex.com/" rel="nofollow noreferrer">PLINQ integration module for F#</a>.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload