Christophe Rhodes <firstname.lastname@example.org> wrote:
| Alexander Schmolck <email@example.com> writes:
| > will compute k(20000) just fine in any non-ancient version of python
| > (it is in fact several orders of magnitude faster than compiled
| > cmucl which I eventually ^C'ed and seems to be about the same speed
| > as clisp).
| Be careful of what you are measuring. You don't quote how you made
| your observations, but you might be running into a performance problem
| in cmucl, where the factorial is in fact computed acceptably fast, but
| printing of return value (by the REPL) takes a very long time.
No, I tried his example in CMUCL, and observed that the printout
from TIME occurred *before* all the GC'ing started to print the value.
So he was indeed measuring what he thought he did.
That is, (TIME (DEFPARAMETER *F20K* (FACT 20000))) didn't GC at all
[though it did cons just over 900KB] and reported the same runtimes
as (TIME (FACT 20000)), whereas simply typing *F20K* to the REPL
GC'd *numerous* times before finally printing the value. ;-}
Rob Warnock <firstname.lastname@example.org>
627 26th Avenue <URL:http://rpw3.org/>
San Mateo, CA 94403 (650)572-2607