[erlang-questions] Update on sharing constant data locally by reference rather than by copy?

Olivier Boudeville olivier.boudeville@REDACTED
Wed Mar 18 20:35:35 CET 2009


would it be possible to have an update regarding how an immutable data
structure (which is not a binary) could be shared between several
processes on the same Erlang node, without having one copy of that data
structure per process?

I know that the Erlang semantics allows processes to access that
constant data as if there was only one copy of it, but, as I understand,
in practice, currently, they do not access to that data through a const
pointer but still rely on a private copy of it instead

Is it planned to implement a more efficient sharing which would not
involve a copy?

More precisely, I would need that a large number of processes created on
a node are able to access very frequently to the same set of associative
tables, as efficiently as possible. Having specific process(es) owning
the shared tables and answering to look-up requests is not an option,
due to the message overhead.

I know ETS could be a solution, but I would like to compare it with the
performances that could be obtained in pure Erlang, supposing that, for
small tables (up to, say, ~30 entries), a smart pure Erlang hashtable
implementation might outperform ETS? (CPU and/or memory-wise)

Thanks in advance for any piece of advice,


More information about the erlang-questions mailing list