On Fri, Sep 25, 2009 at 11:47 AM, Žiga Lenarčič ziga.lenarcic@gmail.com wrote:
So the naming of the variables affects the speed? Asterisk around names gives faster dynamic variables?
No, using asterisks for global variables only ensures that no local variable will accidentally become special (and incur in a performance hit) as the effect of a completely unrelated global variable.
Example:
(defvar x)
(defun f (x) ...) ;x is special (let ((x ...)) ...) ;x is special
(defvar *x*)
(defun f (x) ...) ;x is lexical (let ((*x* ...)) ...) ;*x* is special
Maxima uses too many dynamic variables in general probably - in that sense it's a badly written software.
afaik that's because it was originally written in a dynamically scoped Lisp.