aboutsummaryrefslogtreecommitdiff
path: root/FAQ.md
diff options
context:
space:
mode:
authorDan Gohman <sunfish@mozilla.com>2015-09-08 11:32:28 -0700
committerDan Gohman <sunfish@mozilla.com>2015-09-08 11:32:28 -0700
commitac42e69b38c6a5b0aa2fe3ce52e2eba2e0e73ee8 (patch)
tree77f73e198f7be9b65a7130814d703cf0d75e46a5 /FAQ.md
parent863d084235229da71ff165289d2d976da931598f (diff)
downloadnanowasm-design-ac42e69b38c6a5b0aa2fe3ce52e2eba2e0e73ee8.tar.gz
Add an FAQ about using 8 bytes for storing pointers.
Diffstat (limited to 'FAQ.md')
-rw-r--r--FAQ.md15
1 files changed, 15 insertions, 0 deletions
diff --git a/FAQ.md b/FAQ.md
index d4e8c8a..8adea97 100644
--- a/FAQ.md
+++ b/FAQ.md
@@ -285,3 +285,18 @@ attempts to introduce abstractions.
And finally, it's still possible to add an abstract `size_t` in the future if
the need arises and practicalities permit it.
+
+## Why have wasm32 and wasm64, instead of just using 8 bytes for storing pointers?
+
+A great number of applications that don't ever need as much as 4 GiB of memory.
+Forcing all these applications to use 8 bytes for every pointer they store would
+significantly increase the amount of memory they require, and decrease their
+effective utilization of important hardware resources such as cache and memory
+bandwidth.
+
+The motivations and performance effects here should be essentially the same as
+those that motivated the development of the
+[x32 ABI](https://en.wikipedia.org/wiki/X32_ABI) for Linux.
+
+Even Knuth found it worthwhile to give us his opinion on this issue at point,
+[a flame about 64-bit pointers](http://www-cs-faculty.stanford.edu/~uno/news08.html).