[erlang-questions] Size of a map key in words

Richard A. O'Keefe ok@REDACTED
Fri Jun 30 03:13:30 CEST 2017

> On 30/06/2017, at 12:23 PM, Michael Truog <mjtruog@REDACTED> wrote:
> http://erlang.org/doc/efficiency_guide/advanced.html#id68923 has the memory information and https://github.com/okeuday/erlang_term shows how to get this size during runtime.

Those two disagree.  For example, erlang_term says
Small Map (N =< 32):
  4 words + 2 words per key/value pair + the size of each pair
whereas advanced.html says
Small Map
  5 words + the size of all keys and values.

The latter just *has* to be wrong, the former is at least believable.

More information about the erlang-questions mailing list