Windows package built w/ CCL



On 3/4/11 8:46 PM, Barton Willis wrote:
> Maxima sometimes works around slowness in GCL. Maybe the following has
> been improved in GCL (but not in 2.6.8). In short, GCL is sometimes
> slow with rational addition, but the same calculation in Maxima is
> much faster.
>
> First with GCL:
>
> (%i1) showtime : all$
>
> (%i2) :lisp(defun $hsum_cl (n) (let ((s 0)) (while (> n 0) (setq s (+ s (/ 1 n))) (decf n)) (to s)))
> $HSUM_CL
>
> Super slow:
>
> (%i2) hsum_cl(10000)$
> Evaluation took 136.2400 seconds (136.2400 elapsed)
>
Mostly like because you're running intepreted code, not compiled.  Try
:lisp (compile '$hsum_cl) before running the test.

> Second with CCL--the CL version and the Maxima version run in about the same time.
Very likely because ccl is a compiler-only Lisp.  I think it has no
interpreter and compiles everything.

I did not test this, but cmucl has an interpreter so $hsum_cl would
probably be quite slow too, but it might be dominated by the big
rational arithmetic instead of the interpreter.

Ray