[erlang-questions] Message-sending performance

Per Hedeland per@REDACTED
Wed Sep 12 08:11:39 CEST 2007


David King <dking@REDACTED> 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.

--Per Hedeland



More information about the erlang-questions mailing list