# HG changeset patch # User Steve Losh # Date 1462907113 0 # Node ID b073c3d4a7a97331e53670b94a5d4b8699b337b0 # Parent 9becedc43e4d01bc8e4311f5092f4001fcd6ab67 Don't put structure cells on the heap This is the first optimization in chapter 5. It seems to help a little bit, and is almost trivial to implement. Cool. diff -r 9becedc43e4d -r b073c3d4a7a9 src/wam/vm.lisp --- a/src/wam/vm.lisp Tue May 10 00:05:11 2016 +0000 +++ b/src/wam/vm.lisp Tue May 10 19:05:13 2016 +0000 @@ -248,8 +248,8 @@ (functor functor-index) (register register-index)) (setf (wam-local-register wam register) - (push-new-structure! wam)) - (push-new-functor! wam functor)) + (make-cell-structure + (nth-value 1 (push-new-functor! wam functor))))) (define-instructions (%set-variable-local %set-variable-stack) ((wam wam)