Performance of method calls

Marcio mqmnews123 at sglebs.com
Thu Nov 30 08:59:46 PST 2006


Daniel Keep wrote:
> Anyway, I was wondering what the difference between three kinds of 
> function calls would be:
> 
> 1. Foo x; x.call(); // Where Foo is a struct
> 2. Foo_call(x); // C-style API
> 3. auto y = new FooClass; y.call(); // Where call is final



	I remember using SmartEiffel a couple of years ago and it used to do 
global analysis and would optimize out polymorphic calls that weren't 
really polymorphic. Normal numbers were 90% of polymorphic calls 
transformed into regular function calls. The performance was amazing.

	Maybe you want to test your code under their compiler as well?

marcio



More information about the Digitalmars-d mailing list