[cffi-devel] CFFI and SBCL

Immanuel Litzroth immanuell at enfocus.be
Tue Sep 27 15:18:40 UTC 2005


"Luis Oliveira" <luismbo at gmail.com> writes:

> On 27/set/2005, at 14:04, Immanuel Litzroth wrote:
>>> Hmm, I would assume SBCL/CMUCL translate sb-alien:int and c-call:int
>>> to a fixnum already but I can't say that I checked. Is my assumption
>>> incorrect?
>>
>> Not if the int is 32 bits. You get a efficiency not about this when
>> compiling
>> with speed set to 3. If the int is only 30 bit the note goes away
>> and I have
>> some code where this was important (ffi to portmidi).
>
> Ah, right... that makes sense. Anyway this is a pretty specific
> optimization, right? I mean, this makes sense only for int and (long)
> long. Well, and when one is using long's it's very likely that one
> will be handling values bigger than most-positive-fixnum anyway.
>
> Did I miss any other cases?

nope, that's about it. 
>
>> I think the two different design decisions are best exemplified in
>> cmucl
>> (lists of objects with finalizers, but when the finalizer is run
>> your object
>> has already been garbage collected) and lispworks where the object
>> is passed
>> to the finalizer.
>
> Cool, thanks. I'll check those out.

Thank you!
Immanuel




More information about the cffi-devel mailing list