I just committed a set of changes that simplify the way ECL handles SETF definitions, including both the macroexpanders and the SETF functions. In the last case ECL uses an optimization present also in SBCL, which is to store the location of the SETF function slot in the compiled code, avoiding repeated calls to FDEFINITION.<div>
<br></div><div>This provides some speedup in code that is intensive on SETF functions, such as code using CLOS. In the PRINT/PRETTY benchmark, for instance, this gives about 10% speedup on my tiny laptop.</div><div><br></div>
<div>The whole code also cleans up a little bit the existing mess of SETF forms, which included structure accessors, long and short DEFSETF forms and DEFINE-SETF-METHOD forms, each of which was using a different way of storing its macroexpanders.</div>
<div><br></div><div>It also introduces a tiny optimization which allows ECL to remove the enclosing LET/MULTIPLE-VALUE-BIND when expanding a SETF form. The basic idea s that when a SETF expansion consists of a function name, the same list of arguments and the value, that is</div>
<div><br></div><div>(SETF (FOO a1 ... aN) X) -> (FAA a1 ... aN X)</div><div><br></div><div>then ECL recognizes that there is no need to create any temporaries. I think I got this right, didn't I?</div><div><br></div>
<div>Please report any problem.<br><div><br></div><div>Juanjo<br clear="all"><div><br></div>-- <br>Instituto de Física Fundamental, CSIC<br>c/ Serrano, 113b, Madrid 28006 (Spain) <br><a href="http://juanjose.garciaripoll.googlepages.com" target="_blank">http://juanjose.garciaripoll.googlepages.com</a><br>
</div></div>