[cffi-devel] CFFI and SBCL

Luis Oliveira luismbo at gmail.com
Tue Sep 27 15:02:51 UTC 2005


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?


> 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.


-- 
Luís Oliveira
http://student.dei.uc.pt/~lmoliv/
Equipa Portuguesa do Translation Project
http://www.iro.umontreal.ca/translation/registry.cgi?team=pt




More information about the cffi-devel mailing list