On Tue, 2004-03-23 at 02:36, Christophe Rhodes wrote:
> It's a bit hard to tell, but there is something that is at least
> suspicious. The system needs to know that you will want to inline
> functions in the future; otherwise the function will in fact be
> non-inlineable. To make a function inlineable, the compiler needs to
> (declaim (inline foo))
> (defun foo () ...)
> and since you didn't include one of those, it's possible that you've
> left it out from your own code? If you don't want FOO inline
> everywhere, then you can put
> (declaim (notinline foo))
> after the definition of foo, and then declare it inline locally as you
> did in your second function.
Doh! Right. I had read the page in the hyperspec that described all this
and had misunderstood what it was trying to achieve with that. I added
the DECLAIM and it worked great. Thank you.
> As for respecting both the INLINE and FTYPE declarations at the same
> time, I'm not sure whether that happens when the inlining is actually
> performed. For most cases it doesn't matter, because sbcl is quite
> capable of deriving result types itself.
Actually, that seems to work fine now. I have this feeling that by not
declaiming the inline, SBCL was not able to derive the type info for
some reason. Not sure why, but you might want to check on it. It
probably should not have complained at me about type info, just instead
silently refusing to do the inline until I did the declarations
Also, the FTYPE does seems to make a very slight speed difference. It's
very slight but noticeable.
Again, thank you.
Dave Roberts <ldave@...>