[cffi-devel] Performance of CFFI:PARSE-TYPE

Luís Oliveira luismbo at gmail.com
Fri May 30 15:49:41 UTC 2008


On Fri, May 30, 2008 at 3:21 PM, Hans Hübner <hans at huebner.org> wrote:
> I have recently switched to using the cffi+lotsastuff version and I
> find it very slow for certain applications.  The reason for this is
> that PARSE-TYPE is called from FOREIGN-TYPE-SIZE, and PARSE-TYPE is
> very expensive.  It would be relatively easy to cache the type parsing
> results in a hash table, but before moving forward in that direction,
> I'd like to know what your opinions on this is.

PARSE-TYPE has been slow ever since it started to check for cycles.
This change is not specific to the cffi+lotsastuff branch:

<http://common-lisp.net/cgi-bin/darcsweb/darcsweb.cgi?r=cffi-cffi;a=filediff;h=20070607201117-28748-603bfd1543f4bbe02ad87bff9034b3beb3abd401.gz;f=src/early-types.lisp>

A few weeks ago, some optimizations to PARSE-TYPE and FOREIGN-ALLOC
(which was calling PARSE-TYPE more often than necessary). What's your
use case?

-- 
Luís Oliveira
http://student.dei.uc.pt/~lmoliv/



More information about the cffi-devel mailing list