From a0fc666ec22109206141936cb4550bea61da76e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?= Date: Sun, 28 Feb 2010 08:51:15 +0100 Subject: Efficiency Guide: Fix typos --- system/doc/efficiency_guide/advanced.xml | 2 +- system/doc/efficiency_guide/myths.xml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/system/doc/efficiency_guide/advanced.xml b/system/doc/efficiency_guide/advanced.xml index 0ec3afbd59..82f82f9fd6 100644 --- a/system/doc/efficiency_guide/advanced.xml +++ b/system/doc/efficiency_guide/advanced.xml @@ -175,7 +175,7 @@ The maximum number of atoms is 1048576. Total amount of data allocated by an Erlang node The Erlang runtime system can use the complete 32 (or 64) bit address space, but the operating system often limits a single process to use less than that. - length of a node name + Length of a node name An Erlang node name has the form host@shortname or host@longname. The node name is used as an atom within the system so the maximum size of 255 holds for the node name too. Open ports diff --git a/system/doc/efficiency_guide/myths.xml b/system/doc/efficiency_guide/myths.xml index 76a72368bb..65113c9372 100644 --- a/system/doc/efficiency_guide/myths.xml +++ b/system/doc/efficiency_guide/myths.xml @@ -168,8 +168,8 @@ vanilla_reverse([], Acc) ->

Actually, string handling could be slow if done improperly. In Erlang, you'll have to think a little more about how the strings are used and choose an appropriate representation and use - the re instead of the obsolete - regexp module if you are going to use regualr expressions.

+ the re module instead of the obsolete + regexp module if you are going to use regular expressions.

-- cgit v1.2.3 From cedee54fd81ddf8e4423e5ad4b3e6454001c6e95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?= Date: Sun, 28 Feb 2010 09:10:34 +0100 Subject: Efficiency Guide: The maximum number of atoms can be configured --- system/doc/efficiency_guide/advanced.xml | 3 ++- system/doc/efficiency_guide/commoncaveats.xml | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/system/doc/efficiency_guide/advanced.xml b/system/doc/efficiency_guide/advanced.xml index 82f82f9fd6..6a191ebdb8 100644 --- a/system/doc/efficiency_guide/advanced.xml +++ b/system/doc/efficiency_guide/advanced.xml @@ -154,7 +154,8 @@ On 64-bit architectures: 4 words for a reference from the current local node, an 255 Atoms -The maximum number of atoms is 1048576. + By default, the maximum number of atoms is 1048576. + This limit can be raised or lowered using the +t option. Ets-tables The default is 1400, can be changed with the environment variable ERL_MAX_ETS_TABLES. Elements in a tuple diff --git a/system/doc/efficiency_guide/commoncaveats.xml b/system/doc/efficiency_guide/commoncaveats.xml index e18e5aa510..326db6df8c 100644 --- a/system/doc/efficiency_guide/commoncaveats.xml +++ b/system/doc/efficiency_guide/commoncaveats.xml @@ -69,7 +69,7 @@

Atoms are not garbage-collected. Once an atom is created, it will never be removed. The emulator will terminate if the limit for the number - of atoms (1048576) is reached.

+ of atoms (1048576 by default) is reached.

Therefore, converting arbitrary input strings to atoms could be dangerous in a system that will run continuously. -- cgit v1.2.3 From 5a662ce8fa95ab467e77a654088df43e5528a584 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?= Date: Sun, 28 Feb 2010 09:41:40 +0100 Subject: Efficiency Guide: Recommend external funs over tuple funs --- system/doc/efficiency_guide/functions.xml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/system/doc/efficiency_guide/functions.xml b/system/doc/efficiency_guide/functions.xml index d55b60e39c..0d2e756900 100644 --- a/system/doc/efficiency_guide/functions.xml +++ b/system/doc/efficiency_guide/functions.xml @@ -179,7 +179,9 @@ explicit_map_pairs(Map, Xs0, Ys0) -> A "tuple fun", {Module,Function}, is not a fun. The cost for calling a "tuple fun" is similar to that of apply/3 or worse. Using "tuple funs" is strongly discouraged, - as they may not be supported in a future release.

+ as they may not be supported in a future release, + and because there exists a superior alternative since the R10B + release, namely the fun Module:Function/Arity syntax.

apply/3 must look up the code for the function to execute in a hash table. Therefore, it will always be slower than a -- cgit v1.2.3