[Shootout-list] Re: ghc accerman (same speed, smaller loc) and procinst update

Aaron Denney wnoise@ofb.net
Sat, 2 Oct 2004 20:32:48 -0600


On Sun, Oct 03, 2004 at 05:23:42AM +0300, Einar Karttunen wrote:
> On 03.10 02:02, Aaron Denney wrote:
> > On 2004-10-02, Einar Karttunen <ekarttun@cs.helsinki.fi> wrote:
> > > Added a Haskell version for procinst. This seems quite fast and clean. 
> > > Please feel free to nuke/modify it if the test changes.
> > 
> > It does, but I'm not sure it's fair, as the MVar is created by the
> > process, and no-one else has a reference to it.
> 
> Well it is returned by the spawning function, just not used by
> anything. There is no real way of sending messages to threads in
> haskell, it is done instead with MVars (or Chans which are implemented
> with MVars). 
> 
> Writing to the MVars does not create significant costs, but I didn't
> include it since the erlang test does not have it either.

True.  I think I'd be happier if it were changed to
wakers <- replicateM (read num) procinst
but it's not going to make any difference.

-- 
Aaron Denney
-><-