[Shootout-list] Producer/consumer using processes?

Brent A. Fulgham bfulgham@debian.org
Sun, 13 Jun 2004 00:34:42 -0700


Einar Karttunen wrote:

>Hello
>
>Erlang has no concept of threads, just processes that communicate
>by passing messages to each other. Would implementing the
>producer/consumer test with message passing be ok?
>  
>
Yes.  MzScheme has the same architecture, and I see no reason for this 
to be a problem.  I'm not really sure what Doug's original goal of the 
test was, but I view it as a way of assessing a language's ability to 
program problems that involve parallel execution.

I see no reason to limit this to pure OS threads.

>This is an incomplete example of how this would work, does
>implementing it make sense?
>
>  
>
[ .... snip implementation ... ]

>ps. Tests that take longer and are thus not related to startup time
>would be nice. And the producer/consumer would make sense with 100
>producers ;)
>  
>
Agreed.  Erlang doesn't fare so well on many of the tests, owing largely 
to startop cost.  It's not really a fair comparison.  Playing to one of 
Erlang's strengths would be nice.

Ideas for other tests are welcome!  At the very least I intend to add 
some kind of search-based problem (8 queens?  Universal Solver?) to 
showcase Prolog/Oz/etc. a bit better.

-Brent