[Openmcl-devel] how does one cause stack-allocation for floats? [2]

Joel Reymont joelr1 at gmail.com
Wed Mar 29 04:29:40 PST 2006


James,

On Mar 29, 2006, at 1:20 PM, James Anderson wrote:
> hello again;
>
> yes, yes, yes, i [have tried to] openly admit, that my instructions  
> to the
> compiler are incoherent.
> unfortunately, the language of standard lisp does not offer a means  
> to say it
> coherently.

I may be missing the point but is there anything incoherent about the  
declarations below?

(defun jl (x)
             (declare (optimize speed) (double-float x))
	    (let* ((sum x))
               (declare (double-float sum))
	    (dotimes (i 1000000 sum) (incf sum i))
	    sum))

The compiled version conses 1 cell and 24 bytes with ACL 8.0 and 72  
bytes with SBCL 0.9.9 on Mac OSX. OpenMCL must have an issue with  
this but it's not related to the "language of standard Lisp".

	Thanks, Joel

--
http://wagerlabs.com/








More information about the Openmcl-devel mailing list