> In sbcl-0.8.10/x86/Linux, this file
> (cl:in-package :cl-user)
> (defvar *yoworld* "Yo, world.")
> (defun yo () (print *yoworld*))
> compiles to 3325 bytes of .fasl; after mutating the compiler by
> compiling and loading the attached code, it's 2344.
I played with this little patch today, trying to get warm load to use
the patch for compilation (by compiling and loading the file prior to
compiling PCL and suchlike). I found this change was necessary:
(defun quoted-fopcompile (form for-value-p)
(let ((sb-fasl::*dump-only-valid-structures* nil))
(dump-object form *compile-object*))))
So that structures will get dumped properly.
All told, the struggle was one of much frustration (and learning about
SBCL), but not much win, except in the size of the .fasl files. Using
the patch saved ~10% on the size of the .fasl files, but the sizes of
the newly dumped cores post-warm load were nearly identical. A
previous attempt to stitch the whole patch into src/compiler/main.lisp
was met with some frustration (bootstrapping issues?); doing things in
warm load seemed easier.
(which is, of course, not to say that it might not be useful