1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-20 03:30:27 +02:00

Improved the VM's efficiency. The VM is as fast as the interpreter. :-(

* benchmark/lib.scm:  New file.
* benchmark/measure.scm:  New file.
* README:  Added useful pointers to various threads.
* doc/guile-vm.texi:  Fixed the description of `load-program' (it now expects
  _immediate_ integers).
* src/*.[ch]:  Use immediate integers whereever possible, as in the original
  code.  For `CONS', use `scm_cell' rather than `scm_cons'.

git-archimport-id: lcourtes@laas.fr--2004-libre/guile-vm--revival--0.6--patch-6
This commit is contained in:
Ludovic Court`es 2005-04-29 14:12:12 +00:00 committed by Ludovic Courtès
parent 238e7a11a8
commit 2d80426a3e
16 changed files with 275 additions and 51 deletions

View file

@ -216,10 +216,15 @@
#define DROP() do { CHECK_UNDERFLOW (); sp--; } while (0)
#define POP(x) do { x = *sp; DROP (); } while (0)
#define CONS(x,y,z) \
{ \
SYNC_BEFORE_GC (); \
x = scm_cons (y, z); \
/* A fast CONS. This has to be fast since its used, for instance, by
POP_LIST when fetching a function's argument list. Note: `scm_cell' is an
inlined function in Guile 1.7. Unfortunately, it calls
`scm_gc_for_newcell ()' which is _not_ inlined and allocated cells on the
heap. XXX */
#define CONS(x,y,z) \
{ \
SYNC_BEFORE_GC (); \
x = scm_cell (SCM_UNPACK (y), SCM_UNPACK (z)); \
}
#define POP_LIST(n) \