[Ecls-list] SETF expanders and interpreted code

Matthew Mondor mm_lists at pulsar-zone.net
Fri Jul 16 05:20:49 UTC 2010


On Thu, 15 Jul 2010 17:38:30 -0400
Matthew Mondor <mm_lists at pulsar-zone.net> wrote:

> I could test a newly built ECL, and confirm that I no longer get the
> undefined SETF function error.  I was also getting SIGSEGV/segfault
> signals using INCF earlier but am now getting another error for INCF,
> which might indicate a problem in my SETF expansion temporary/storage
> variables.  I'll have to take a deeper look at them when I can.

I can also confirm that setting an expander to use a macro with a global
and local-macrolet override also allows proper expansion as I initially
expected, and that I could use it to inline accessors in some custom
FFI code.

An example function looping many times and using the setf expanders,
takes ~0.248 seconds versus the one using
WITH-INLINE-C-STRUCTURE-ACCESSORS now taking ~0.022 seconds.
The former uses functions, while the later uses inline C, but has the
obvious restriction of only being available in compiled code.

The power of Common Lisp (and of ECL by extension) still continues to
impress me.

Thanks again,
-- 
Matt




More information about the ecl-devel mailing list