|Optimization for OOP email@example.com (2008-05-03)|
|Re: Optimization for OOP firstname.lastname@example.org (2008-05-05)|
|Re: Optimization for OOP email@example.com (Dmitry A. Kazakov) (2008-05-05)|
|Re: Optimization for OOP firstname.lastname@example.org (Tony Finch) (2008-05-05)|
|Re: Optimization for OOP email@example.com (firstname.lastname@example.org) (2008-05-05)|
|Re: Optimization for OOP email@example.com (Dmitry A. Kazakov) (2008-05-06)|
|Re: Optimization for OOP firstname.lastname@example.org (2008-05-06)|
|From:||"Dmitry A. Kazakov" <email@example.com>|
|Date:||Mon, 5 May 2008 18:37:26 +0200|
|Organization:||cbb software GmbH|
|Posted-Date:||05 May 2008 17:12:42 EDT|
On Mon, 05 May 2008 09:45:24 +0200, Torben Fgidius Mogensen wrote:
> The most important optimisation is to get rid of dynamic method calls.
> This can, however, be quite tricky as you can't tell if a method can
> be overridden without knowing the whole program, so it plays havoc
> with separate compilation. A compromise is to allow methods to be
> declared "final", which ensures it is never overridden.
I think a consistent types system would be a better way. In Ada it is
always known if a call is dispatching or not. That is because of
proper typing. When an object is of a specific type, its methods never
dispatch, for that obvious reason, that the type is known to be
For the same reason in Ada there is no implicit re-dispatch from the
method bodies. A method always deals with a specific type, it has
dispatched before. Therefore any further calls from there to other
methods never dispatch again. The compiler knows their targets
statically, it can inline them etc.
Dmitry A. Kazakov
Return to the
Search the comp.compilers archives again.