[erlang-questions] Message-sending performance
Wed Sep 12 08:11:39 CEST 2007
David King <> wrote:
>For 100,000 messages, it's now instantaneous when accepting them out
>of order. Now there doesn't appear to be a difference between one
>scheduler or two until approximately 100,000,000 messages.
Maybe just a nitpick, but you aren't receiving the messages "out of
order", only interleaved - i.e. between each sender-receiver pair of
processes, messages are received in the order they were sent. You would
get approximately the same result if you via selective receive first
accepted message 1 from all senders, then message 2 from all, and so on
- your problem earlier was that you insisted on receiving *all* messages
from one process before accepting *any* from the other, causing the
latter to be queued up in your message queue.
More information about the erlang-questions