summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2015-09-18 10:43:06 +0200
committerAndy Wingo <wingo@pobox.com>2015-10-21 11:49:20 +0200
commita0a8741608a4094cbd0f4d25d6bfdec1ff9e48eb (patch)
tree2489941af40fcd417af98b9eb951932527182d35
parent315adb6347c3e51f4e24fa32ff08458f2aa1b09c (diff)
downloadguile-a0a8741608a4094cbd0f4d25d6bfdec1ff9e48eb.tar.gz
Minor VM documentation updates
* doc/ref/vm.texi (Why a VM?, Variables and the VM): Minor updates.
-rw-r--r--doc/ref/vm.texi16
1 files changed, 9 insertions, 7 deletions
diff --git a/doc/ref/vm.texi b/doc/ref/vm.texi
index 6616af446..ba31d7ccb 100644
--- a/doc/ref/vm.texi
+++ b/doc/ref/vm.texi
@@ -80,11 +80,12 @@ but it is not normally used at runtime.)
The upside of implementing the interpreter in Scheme is that we preserve
tail calls and multiple-value handling between interpreted and compiled
-code. The downside is that the interpreter in Guile 2.2 is still slower
-than the interpreter in 1.8. We hope the that the compiler's speed makes
-up for the loss. In any case, once we have native compilation for
-Scheme code, we expect the new self-hosted interpreter to beat the old
-hand-tuned C implementation.
+code. The downside is that the interpreter in Guile 2.2 is still about
+twice as slow as the interpreter in 1.8. Since Scheme users are mostly
+running compiled code, the compiler's speed more than makes up for the
+loss. In any case, once we have native compilation for Scheme code, we
+expect the self-hosted interpreter to handily beat the old hand-tuned C
+implementation.
Also note that this decision to implement a bytecode compiler does not
preclude native compilation. We can compile from bytecode to native
@@ -213,8 +214,9 @@ variables are allocated in ``boxes''---actually, in variable cells.
variables are indirected through the boxes.
Thus perhaps counterintuitively, what would seem ``closer to the
-metal'', viz @code{set!}, actually forces an extra memory allocation
-and indirection.
+metal'', viz @code{set!}, actually forces an extra memory allocation and
+indirection. Sometimes Guile's optimizer can remove this allocation,
+but not always.
Going back to our example, @code{b} may be allocated on the stack, as
it is never mutated.