Re: Is the following behavior defined by the standard or implementation specific?
- From: "John Thingstad" <john.thingstad@xxxxxxxxx>
- Date: Mon, 30 Jul 2007 19:50:10 +0200
På Mon, 30 Jul 2007 17:55:27 +0200, skrev Robert Uhl <eadmund42@xxxxxxxxxxxxxxx>:
"Thomas F. Bur***" <tbur***@xxxxxxxxx> writes:
One last note: you might be interested in the sb-ext:*derive-function-
types* switch in SBCL. It gives a slightly different and non-ANSI
behavior to type declarations: it more or less declaims the ftype that
the compiler is able to inference whenever you define a function. So
you can write code like:
(defun sss (x y)
(declare (double-float x y))
(+ x y))
And it would have the same effect as the ftype declaration you gave
above.
Ooooh--nice. I'll have to play with that some. I wonder if it'd also
do the warning-if-redefined-incompatibly bit. That could actually be
pretty sweet.
Erm wouldn't you need a (declaim (inline sss)) before it made much difference.
(Except on Allegro which inlines automatically)
Function calls are expensive in that you look up the address of the function then call it.
.
- References:
- Is the following behavior defined by the standard or implementation specific?
- From: Jason Nielsen
- Re: Is the following behavior defined by the standard or implementation specific?
- From: Thomas F. Bur***
- Re: Is the following behavior defined by the standard or implementation specific?
- From: Robert Uhl
- Is the following behavior defined by the standard or implementation specific?
- Prev by Date: Re: I symbolics still selling machines? does anyone use the lisp genera os?
- Next by Date: Some expert comment please
- Previous by thread: Re: Is the following behavior defined by the standard or implementation specific?
- Next by thread: No Vacancy
- Index(es):