I spoke too soon.
> (defun square-df (x)
>   (declare (double-float x))
>   (prog ((var 0.0d0))
>      (setq var (* x x))
>      var))

is faster because it doesn't work.  It returns NIL instead of the
square of the number.  I don't understand why, and I'm still left with
the question of is there any way to make this faster?

> (defun square (x)
>   (* x x))

> (defun square-df-int (x)
>   (declare (double-float x))
>   (* x x))

It seems that square-df-int is about 30% faster than square, but is
that all I'm going to get, because I have to convert the thing back
into a lisp object every time I return from square?

rif


Reply via email to