Windows package built w/ CCL



-----maxima-bounces at math.utexas.edu wrote: -----

>Mostly?like?because?you're?running?intepreted?code,?not?compiled.??Try
>:lisp?(compile?'$hsum_cl)?before?running?the?test.

Using GCL, hsum_cl is slow with or without compiling. I discovered this
years ago. Maybe this has been fixed in GCL, but apparently the fix isn't
in the GCL version used by Maxima. I think Maxima has its own function for 
rational number addition that is (sometimes) much faster than 
GCL's addition--for my test about 200 times faster.

What this all means for deciding on CCL vs GCL for Windows is unclear. Maxima
and GCL grew up together, so it's not surprising that they often work well
together. 

(%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

(%i2) hsum_cl(10000)$
Evaluation took 147.4300 seconds (147.4300 elapsed)
(%i3) :lisp (compile '$hsum_cl)

(%i3) hsum_cl(10000)$
Evaluation took 100.4800 seconds (100.4800 elapsed)

(%i4) hsum_max(n) := block([s : 0], while n > 0 do (s : s + 1/n, n : n-1),s)$

(%i5) hsum_max(10000)$
Evaluation took 0.5100 seconds (0.5100 elapsed)