Path: utzoo!utgpu!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!unmvax!ncar!ames!amdcad!sun!pitstop!sundc!seismo!uunet!mcvax!ukc!etive!aipna!jeff From: jeff@aipna.ed.ac.uk (Jeff Dalton) Newsgroups: comp.lang.lisp Subject: Re: The best way to save data Keywords: save, load, lisp, Database Message-ID: <414@aipna.ed.ac.uk> Date: 18 Dec 88 17:41:09 GMT References: <627@wucs1.wustl.edu> <7943@orstcs.CS.ORST.EDU> Reply-To: jeff@uk.ac.ed.aipna.UUCP (Jeff Dalton) Organization: Dept. of AI, Edinburgh, UK Lines: 23 In article <7943@orstcs.CS.ORST.EDU> ruffwork@urania.CS.ORST.EDU (Ritchey Ruff) writes: > (setq *foo* ) (...) > (compile-file "foo") Of course this is not human readable, and the output will only read back into the lisp it was compiled from, but if you are like me and need to dump 2 to 10 Meg structures to files then read them back in this saves 2 to 5 minutes of load time... The problem with this trick is that it's not guaranteed to work in every Common Lisp. You can do it, but some CL's (e.g., KCL) use PRINT and READ to dump and load data in compiled files, so you won't necessarily save anything over using PRINT and READ yourself. And even if CL changes on the way to standardization to rule out using READ to load compiled data, there's still no guarantee that the operation will be much faster than READ. BTW, this suggests that the dump/load used for compiled data should be available directly, without compiling a file. But it's quite common in Common Lisp for such operations (where you know they're there and want to get at them) to be unavailable.