The Poor Person's Persistent Object Store,
  OR
How Do I Save This Chunk of Data to a File Efficiently?


You can use MCL's file compiler to save functions, arrays, and other
data to fasl files instead of writing out ascii files. Ascii files
may be human readable, but they're less efficient than fasl files.

The general approach is to have a file named "*saved-object*.lisp" 
containing the following:

-------------------------------------------------------------------------

; *saved-object*.lisp
;
; Compiling this file will make a FASL that will initialize the
; variable *saved-object* to its value when the file was compiled:

(setq *saved-object* '#.*saved-object*)

-------------------------------------------------------------------------


Then you can use the following code to save any object, including
a compiled function, to a fasl file:

(defvar *saved-object* nil)

(defun save-object (object file)
  (let ((*saved-object* object))
    (compile-file "*saved-object*" :output-file file)))

(defun restore-object (file)
  (let ((*saved-object* nil))
    (load file)
    *saved-object*))