[erlang-questions] Newbie question. Joe Armstrong book. Ring benchmark.
Russell Brown
russell.brown@REDACTED
Thu Sep 25 18:05:02 CEST 2008
On 25 Sep 2008, at 16:06, Edwin Fine wrote:
> Hi Russell,
>
> In general, it's worth searching the erlang archives, which often
> have the answers to many questions. The searchable archive is at
> http://www.erlang.org/faq.html.
>
> This post discusses your question. There are quite a few posts in
> the archives about the ring benchmark.
>
> http://www.erlang.org/pipermail/erlang-questions/2006-March/
> 019503.html
Thanks for that. Good resource, should have checked it before, In
future I will be sure too. Seems my version is like a few others out
there and the answer is: yeah, ring benchmark is not so concurrent.
Thanks again. Enjoying this.
Russell
>
>
> 2008/9/25 Russell Brown <russell.brown@REDACTED>
>
> Hi,
> I've just done the "ring benchmark" from the end of Chapter 8 in
> the Joe Armstrong book (Programming Erlang: Software for a
> Concurrent World).
>
> I think I have a module that does what is asked in the problem
> "(Write a ring benchmark. Create N processes in a ring. Send a
> message round the ring M times so that a total of N * M messages
> get sent. Time how long this takes for different values of N and M.)"
>
> I am certain it is nowhere near the best or most elegant way to do
> it as I am not very accomplished (but I do like to have a go
> anyway). What I am wondering is why, when I run the "benchmark"
> only one of the cores on my laptop's dual core seems to get used.
> Have I written it wrong (so that there is no concurrency) or is a
> ring by its nature a sequential thing?
>
> I have attached the code in case it helps answer the above
> question. As I say I am a total newb. My reason for posting is
> just to verify that the implementation works and to find out why it
> only uses one core.
>
> Also, is there a canonical implementation that beginners like me
> can have a look at?
>
> Many thanks in advance
>
> Russell
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://www.erlang.org/mailman/listinfo/erlang-questions
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20080925/bdd8ada3/attachment.htm>
More information about the erlang-questions
mailing list