Perform calculations at compile time and load the result
From: Adam Warner (usenet_at_consulting.net.nz)
Date: 10/27/04
- Next message: Carl Shapiro: "Re: ALU CLiki invaded by spam"
- Previous message: William Bland: "Re: Static vs Dynamic"
- Next in thread: Adam Warner: "Re: Perform calculations at compile time and load the result"
- Reply: Adam Warner: "Re: Perform calculations at compile time and load the result"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 27 Oct 2004 12:30:36 +1300
Hi all,
What's the idiom (without forcing read-time evaluation or dumping a new
Lisp image) to perform a lengthy calculation at compile time and return
the externalizable result at load time?
(eval-when (:compile-toplevel :load-toplevel :execute)
(defvar *variable* ...lengthy calculation...))
The above approach computes everything at compile time and every time the
file is loaded in a new image.
Thanks,
Adam
- Next message: Carl Shapiro: "Re: ALU CLiki invaded by spam"
- Previous message: William Bland: "Re: Static vs Dynamic"
- Next in thread: Adam Warner: "Re: Perform calculations at compile time and load the result"
- Reply: Adam Warner: "Re: Perform calculations at compile time and load the result"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|