A good start when programming efficiently is to have knowledge
about how much memory different data types and operations
require. It is implementation-dependent how much memory the
Erlang data types and other items consume, but here are some
figures for erts-5.2 system (OTP release R9B). (There have been
no significant changes in R13.) The unit of measurement is
memory words. There exists both a 32-bit and a 64-bit
implementation, and a word is therefore, 4 bytes or 8 bytes,
respectively. |Data type||Memory size| |Small integer||1 word On
32-bit architectures: -134217729 < i < 134217728 (28 bits) On
64-bit architectures: -576460752303423489 < i <
576460752303423488 (60 bits) |Big integer||3..N words| |Atom||1
word. Note: an atom refers into an atom table which also
consumes memory. The atom text is stored once for each unique
atom in this table. The atom table is not garbage-collected.|
|Float||On 32-bit architectures: 4 words On 64-bit
architectures: 3 words |Binary||3..6 + data (can be shared)|
|List||1 wor