mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-02 13:00:26 +02:00
Minor VM documentation updates
* doc/ref/vm.texi (Why a VM?, Variables and the VM): Minor updates.
This commit is contained in:
parent
315adb6347
commit
a0a8741608
1 changed files with 9 additions and 7 deletions
|
@ -80,11 +80,12 @@ but it is not normally used at runtime.)
|
||||||
|
|
||||||
The upside of implementing the interpreter in Scheme is that we preserve
|
The upside of implementing the interpreter in Scheme is that we preserve
|
||||||
tail calls and multiple-value handling between interpreted and compiled
|
tail calls and multiple-value handling between interpreted and compiled
|
||||||
code. The downside is that the interpreter in Guile 2.2 is still slower
|
code. The downside is that the interpreter in Guile 2.2 is still about
|
||||||
than the interpreter in 1.8. We hope the that the compiler's speed makes
|
twice as slow as the interpreter in 1.8. Since Scheme users are mostly
|
||||||
up for the loss. In any case, once we have native compilation for
|
running compiled code, the compiler's speed more than makes up for the
|
||||||
Scheme code, we expect the new self-hosted interpreter to beat the old
|
loss. In any case, once we have native compilation for Scheme code, we
|
||||||
hand-tuned C implementation.
|
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
|
Also note that this decision to implement a bytecode compiler does not
|
||||||
preclude native compilation. We can compile from bytecode to native
|
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.
|
variables are indirected through the boxes.
|
||||||
|
|
||||||
Thus perhaps counterintuitively, what would seem ``closer to the
|
Thus perhaps counterintuitively, what would seem ``closer to the
|
||||||
metal'', viz @code{set!}, actually forces an extra memory allocation
|
metal'', viz @code{set!}, actually forces an extra memory allocation and
|
||||||
and indirection.
|
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
|
Going back to our example, @code{b} may be allocated on the stack, as
|
||||||
it is never mutated.
|
it is never mutated.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue