[Haskell-cafe] optimising for vector units

MR K P SCHUPKE k.schupke at imperial.ac.uk
Mon Jul 26 11:51:28 EDT 2004

As far as I understand it haskells lazy evaluation resembles
dataflow computation - IE values are computed on demand.

This problem has already been solved for hardware, you end up
with what is termed a super-scalar architecture. 

Instructions read from memory fill a re-order buffer. As computations
complete value slots in the reorder buffer are filled with the result
values. When an instruction has all its values it can be executed, and
will be assigned to the next available execution unit.

I am not too sure of the internal architecture of GHC, but I can imagine
that funtions waiting to be run will have slots for arguments, that will
be filled in when values become available. 

The whole point is that a function with three parameters can spark
three threads to calculate each parameter without worrying about
the side affects of each function. No locking is necessary because
you only spark one thread for each argument.

I suspect I haven't fully understood the difficaulty in doing this,
care to enlighten me?


More information about the Haskell-Cafe mailing list