On Mon, 26 Sep 2011 14:14:09 -0400, Christian Köstlin
<christian.koest...@gmail.com> wrote:
I have this small program here, which compares the call-overhead of
methods from classes to structs. I guess this always has to be, because
of the "polymorphism" of methods of objects.
Is there something I can do to improve on the performance of methods
calls with classes?
please see the source here:
https://gist.github.com/1242911
In addition to Andrej's information (call sw.reset()), make *sure* you
compile in -release mode, because in non -release mode, all object methods
are followed by a call to Object's invariant, which is never inlined!
However, no invariants are called in release mode.
-Steve