[erlang-questions] proplists vs. dicts memory usage
Mon Jan 18 15:33:26 CET 2010
You can measure how much space an Erlang term takes internally in the
Erlang VM with
the function erts_debug:flat_size(Term).
It takes any Erlang term as input and returns the number of machine-words needed
to store the term.
I.e each word is 32 bits in a 32bit VM and 64 bits in a 64 bit VM.
/Kenneth Erlang/OTP Ericsson
On Mon, Jan 18, 2010 at 3:15 PM, Sean Cribbs <seancribbs@REDACTED> wrote:
> Is there information somewhere on the memory requirements of proplists vs.
> dicts for small numbers of keys (< 100)? If not, is there a nice way to
> measure memory usage at runtime? I'm trying to determine whether switching
> from a dict to a proplist will save space.
> If the difference is negligible, I'll have to figure out some other solution
> (I'm guessing this is the answer).
> Sean Cribbs
> erlang-questions mailing list. See http://www.erlang.org/faq.html
> erlang-questions (at) erlang.org
More information about the erlang-questions