Sophie

Sophie

distrib > Fedora > 18 > i386 > by-pkgid > 4a0a3d2c41a3220630917306c0b7fefa > files > 73

gcl-2.6.8-0.13.20130121cvs.fc18.i686.rpm


We have implemented garbage collection of the c stack.  
Thus any new cons or other data type, may be safely left
on the c stack or in a register, without fear of lossage
due to garbage collection.  This enables us to write smaller
faster code.  We have implemented a scheme for putting 
frequently used variables, and those inside loops, into registers.
For example the compiled sloop.lsp file now has text size
48704, but had text size 53120 or 1.09 times larger.  

If functions are proclaimed to be of fixed number of args,
the code is also substantially better.  For example if you
have the code:

(proclaim '(function memb (t t) t))
(defun memb (a b)
   (sloop for v on b when (eq (car v) a) do (return v)))



If we consider calls where a is the 4'th element of b,
then memb runs  two times faster than before: On a sun 3-50
19.6 seconds for 1,000,000 iterations, as opposed to 39.6 seconds
without the new modifications to c-gc and the compiler.


(defun try (n a b) (sloop for i below n do (memb a b)))

Currently if the variable compiler::*c-gc* is not nil,
the compiler outputs code under the assumption that c-gc is working.
Very bad results would occur if such object code were loaded into a
kcl which did not examine the c stack.  Also if you are wishing
to produce C code for use in an implementation without c-gc
you should set *c-gc* to nil.