Hi Harvey J. Stein,

> If so, it would be nice to be able to tell the compiler that a
> particular function can be redefined, but it's always going to return
> a double-float, so don't bother boxing and unboxing the result.

There is a portable way to tell the compiler this. Refer to FTYPE in the
HyperSpec: <http://www.lisp.org/HyperSpec/Body/dec_ftype.html>

Whether the compiler uses this information to avoid boxing floats across
function calls is another matter. It probably doesn't but one day it may.
You're more likely to find it will enforce the type declaration at a high
level of safety (try it in SBCL).

Regards,
Adam

Reply via email to