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

James Anderson janderson at ravenpack.com
Wed Mar 29 13:27:44 UTC 2006


hello;

yes, that use case succeeds.
the message is still at least incomplete, if not incoherent.
yes, sometimes playing telephone has a nice effect.
sometimes, as i suspect the attached file will demonstrate, the results
disappoint.
[i do not have sbcl, but cmucl's behaviour is similar?]

i think that i really do want to tell the compiler whether it's ok to treat the
cell destructively.

...

> -----Original Message-----
> From: Joel Reymont [mailto:joelr1 at gmail.com]
> Sent: Wednesday, March 29, 2006 14.30
> To: James Anderson
> Cc: openmcl-devel at clozure.com
> Subject: Re: [Openmcl-devel] how does one cause stack-allocation for
> floats? [2]
>
>
> 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/
>
>
>
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cmucl-float.lisp
Type: application/octet-stream
Size: 2307 bytes
Desc: not available
URL: <http://lists.clozure.com/pipermail/openmcl-devel/attachments/20060329/2907343c/attachment.obj>


More information about the Openmcl-devel mailing list