[Ecls-list] Speed of indirect calls.

Juan Jose Garcia-Ripoll juanjose.garciaripoll at googlemail.com
Thu Feb 12 22:52:43 UTC 2009

On Thu, Feb 12, 2009 at 3:55 AM, Waldek Hebisch
<hebisch at math.uni.wroc.pl> wrote:
> However, it looks that such definition is unsafe (because bytecoded
> functions, closures and CLOS generic functions all use different
> calling convention even if the argument list is fixed).
> It would be nice if ECL used uniform calling convention for
> functions with fixed argument lists making the above optimization
> safe (even better, ECL could just generate efficient call).

Yes, I agree that calling conventions right now are a bit slow. There
are some caveats, though, which make the design of new conventions

* Most indirect calls are not done with a fixed or known number of
arguments. Using the latter as a common denominator would be
pointless, specially if we are going to introduce a closure argument.

* I do not want to change the interface to compiled functions, such as
cl_car(), cl_rest(), etc, which are not closures and do not take a
variable number of arguments. That would break the "embeddable" part
in ECL.

* Writing trampolines is not easy and does not survive the evolution
of code. We have some in the assembly part, but 50% of them are right
now broken.


Instituto de Física Fundamental, CSIC
c/ Serrano, 113b, Madrid 28009 (Spain)

More information about the ecl-devel mailing list