[Haskell] Pugs gains SMP parallelism support.

Sebastian Sylvan sylvan at student.chalmers.se
Mon Oct 23 02:57:29 EDT 2006


On 10/22/06, Taral <taralx at gmail.com> wrote:
> On 10/22/06, Audrey Tang <autrijus at gmail.com> wrote:
> > I just implemented it that way, and benchmarking shows little or no
> > parallelism gain is made by it,
> > compared to the [MVar] approach suggested by Sebastian Sylvan
> > ( http://pugs.blogs.com/pugs/2006/10/more_smp_parall.html )...
>
> I wonder why? The IO monad is strict, so the computations should be
> done in parallel...
>

They probably are. However you get the overhead of creating the array
(when you don't really need O(1) random access) and every thread
signals the same semaphore which may lead to some congestion which
could slow things down.

/S
-- 
Sebastian Sylvan
+46(0)736-818655
UIN: 44640862


More information about the Haskell mailing list