[Ecls-list] Improving CLOS?
Juan Jose Garcia-Ripoll
juanjose.garciaripoll at googlemail.com
Fri Mar 19 00:28:54 UTC 2010
On Fri, Mar 19, 2010 at 1:20 AM, Waldek Hebisch <hebisch at math.uni.wroc.pl>wrote:
> They report (depending on number of parameters) between 218 and 77
> milions of dispatching calls per second on 2.5 GHz Core 2. That is
> 11-33 clocks per call. I am affraid that with current call convention
> ECL has no chance to match that: current ECL indirect call costs
> about 75 clocks, so even if dispatching cost would be reduced to 0,
> ECL still would be much slower.
>
Waldek, what do you suggest? Because the indirect dispatch cost is currently
high we should leave CLOS dispatch completely unoptimized? :-)
Indirect calls only happens when ECL does not know whether it has a
non-function object -- currently always by default --. With declarations we
could lower the safety to avoid the 75 clock penalty by simply retrieving
the function pointer from an object. We do not do it right now because of
the check for "callability." In this paper, as well as in C++, they always
know that they only have method calls and that the argument of a generic
function call is indeed a generic function. So the only difference between
them and us right now is the overhead of a safety check plus the humongous
overhead of CLOS dispatch.
Juanjo
--
Instituto de Física Fundamental, CSIC
c/ Serrano, 113b, Madrid 28006 (Spain)
http://tream.dreamhosters.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/ecl-devel/attachments/20100319/45db68c1/attachment.html>
More information about the ecl-devel
mailing list