[erlang-questions] 20k messages in 4s but want to go faster!

Matthew Sackman matthew@REDACTED
Fri Jul 10 21:45:05 CEST 2009

On Fri, Jul 10, 2009 at 09:40:07PM +0200, andrew mmc wrote:
> Yes, just in half each time.  If the input list is of length 1, send the
> message, otherwise spawn two processes for each half of the list.

Is spawning a process truly something that can happen in parallel? Are
there really no VM-wide locks or data structures that have to happen at
this point?

Also, I have to say, I wouldn't use a dict. Immutable data structures in
Erlang are _slow_ when compared to, eg, ets. OTOH, if you've timed the
fold and found it's only taking 0.2 secs, then that's clearly not the
problem here.


More information about the erlang-questions mailing list