[erlang-questions] Process scope variable

Richard A. O'Keefe ok@REDACTED
Fri Feb 20 04:27:19 CET 2015

On 20/02/2015, at 2:23 pm, Imants Cekusins <imantc@REDACTED> wrote:

> > sending a message
> to another process, having it receive, sending a message back, and
> receiving that is EXPENSIVE. 
> I am going to call - not cast the gs.

Not relevant.

> The gs will never be busy handling any other calls. Does it make a difference?

Not much.  I just did a benchmark looping around a million times.
There was no contention in that case.

Threading state through: 10 msec.
Using a state process that was as lightweight as possible: 1670 msec.

This wasn't native compiled, and it didn't do any real work, so I
don't expect real code to be 167 times slower using a state process.
But I do expect it to be a lot slower.

> In any case, whatever the cost, while in the development phase, it's ok.

Faster code means you can afford to run more tests means faster development.
Ceteris paribus.


More information about the erlang-questions mailing list