I have an object o that is an instance of a class X in SBCL.
I want a function write-X-object that serializes o to a file in such a way that when that file is read back in with load-X-object, the resulting object is equivalent to o.
;; writing the object
(write-X-object o "~/tmp/o.serialized")
;; reading the object, much later,
;; after sbcl has been exited and restarted
(setq v (read-X-object "~/tmp/o.serialized"))
o might be about a gigabyte in size (or an array of several million smaller objects), with a complex structure, so the idea is for the reading and writing to be as quick as possible.