aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjörn-Egil Dahlberg <[email protected]>2016-05-26 12:21:35 +0200
committerBjörn-Egil Dahlberg <[email protected]>2016-05-26 12:21:35 +0200
commit1081e3881e3994f381d122600d5db129c0ad0266 (patch)
tree2e960a9c2afb5f820a54b80e5d9e9a86f9f6c182
parentca9ecbb1fb04a80bd849d866b750090975f501f3 (diff)
parent70eea8ef8e597312567f19612e3e99a645503bd2 (diff)
downloadotp-1081e3881e3994f381d122600d5db129c0ad0266.tar.gz
otp-1081e3881e3994f381d122600d5db129c0ad0266.tar.bz2
otp-1081e3881e3994f381d122600d5db129c0ad0266.zip
Merge branch 'egil/update-efficiency-guide'
* egil/update-efficiency-guide: doc: Update version of erts and otp release doc: Update process memory initial size doc: Update efficiency guide with Maps memory info
-rw-r--r--system/doc/efficiency_guide/advanced.xml18
1 files changed, 15 insertions, 3 deletions
diff --git a/system/doc/efficiency_guide/advanced.xml b/system/doc/efficiency_guide/advanced.xml
index 3609b8d88e..016302fe50 100644
--- a/system/doc/efficiency_guide/advanced.xml
+++ b/system/doc/efficiency_guide/advanced.xml
@@ -35,8 +35,7 @@
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 the following table shows some figures for
- the <c>erts-5.2</c> system in R9B. There have been no significant
- changes in R13.</p>
+ the <c>erts-8.0</c> system in OTP 19.0.</p>
<p>The unit of measurement is memory words. There exists both a
32-bit and a 64-bit implementation. A word is therefore 4 bytes or
@@ -87,6 +86,19 @@
<cell>2 words + the size of each element.</cell>
</row>
<row>
+ <cell>Small Map</cell>
+ <cell>4 words + 2 words per entry (key and value) + the size of each key and value pair.</cell>
+ </row>
+ <row>
+ <cell>Large Map</cell>
+ <cell>
+ At least, 2 words + 2 x <c>N</c> words + 2 x log16(<c>N</c>) words +
+ the size of each key and value pair, where <c>N</c> is the number of pairs in the Map.
+ A large Map is represented as a tree internally where each node in the tree is a
+ "sparse tuple" of arity 16.
+ </cell>
+ </row>
+ <row>
<cell>Pid</cell>
<cell>1 word for a process identifier from the current local node
+ 5 words for a process identifier from another node.<br></br>
@@ -122,7 +134,7 @@
</row>
<row>
<cell>Erlang process</cell>
- <cell>327 words when spawned, including a heap of 233 words.</cell>
+ <cell>338 words when spawned, including a heap of 233 words.</cell>
</row>
<tcaption>Memory Size of Different Data Types</tcaption>
</table>