[Haskell-cafe] optimising for vector units

Jon Cast jcast at ou.edu
Mon Jul 26 11:07:38 EDT 2004


Ketil Malde <ketil+haskell at ii.uib.no> wrote:
> MR K P SCHUPKE <k.schupke at imperial.ac.uk> writes:

<snip>

> One would expect a lazy and pure language

Not lazy!  See below.

> to be excellent for parallelization, since the programmer is generally
> removed from the actual flow of execution anyway.  At some point (for
> some n), being able to spawn n threads will gain you more than a
> factor c constant overhead,
  ^^^^^^^^^^^^^^^^^^^^^^^^^^

What makes you think the overhead is constant?  Without Optimistic
Evaluation, Haskell programs mutate /heavily/, and even with Optimistic
Evaluation I'm sure there is some mutation going on.  With a truly
parallel system, every mutation has to be locked in some way; reducing
the number of locking operations to merely constant overhead is an
interesting (as in extremely difficult) research problem.

> and Haskell programs, with a run-time system that can evaluate
> expressions in paralllel, will outperform single threaded C code.
> 
> (But it probably isn't that simple, or we would have it already :-)

Nope.

Jon Cast


More information about the Haskell-Cafe mailing list