From ac42e69b38c6a5b0aa2fe3ce52e2eba2e0e73ee8 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Tue, 8 Sep 2015 11:32:28 -0700 Subject: Add an FAQ about using 8 bytes for storing pointers. --- FAQ.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'FAQ.md') 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). -- cgit v1.2.3