[Shootout-list] Re: ring of processes

Aaron Denney wnoise@ofb.net
Sun, 3 Oct 2004 03:08:49 +0000 (UTC)


On 2004-10-03, Brent Fulgham <bfulgham@debian.org> wrote:
> However, it seems that the message passing behavior of the two is
> widely divergent.
>
> One obvious difference is that the Erlang tests are using atoms as
> the messages they pass around, with a final "atom_to_string" to make
> something we can print.  The Haskell version uses strings, which may
> be more costly to send and process.  Does anyone know if this might be
> playing a part?

I strongly doubt it.  All of the haskell threads are in the same
process, so there's no (de)serialization or anything of the sort
happening.  It's really just pointers being passed around.

Unlike the "procinst" test, there's a lot of context switching going on.
I'm guessing that the haskell scheduler just isn't very tuned for lots
of threads, only one of which is runnable at once.

Another possibility given the large heap usage is garbage-generation &
collection.  Not quite sure what to do about that, though there's a
chance strictness annotations could help.

-- 
Aaron Denney
-><-