[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Lightweight Languages Workshop (DDJ Article)



On Sun, 27 Jan 2002 16:20:14 -0500 (EST), Scott Ribe
<scott_ribe@killerbytes.com> wrote:
>> Can't confirm or deny it. But the Eiffel implementors insist that they
>> have found a solution with add just a constant factor to each
>> Methodinvocation. Well one have to admit Eiffel ist not very dynamic
>> and the compiler has to do a Full System check each time. Maybe than
>> it's possible to come to such a solution.
>
> But Eiffel only does single dispatch, so of course it's possible to
> do it with just a small constant factor more than non-virtual
> dispatch--C++ has had this figured out for a long time now.

I think that this is a reference to the SmallEiffel compiler. It does
whole-program compilation to identify all of the classes in the
program, and then it inlines the discriminator code that picks which
method to invoke. This means (assuming compilation to C) all of the
function calls are direct, and there are no calls through function
pointers. This is nice for optimization purposes, but obviously you
have to give up separate compilation to do this.


Neel