Method Call Overhead Stats for GDC (function vs virtual vs final)

superdan super at dan.org
Fri Jul 25 10:04:36 PDT 2008


Jason House Wrote:

> A few days ago, I added "final" to many of my speed critical function calls and got a 20% speed gain to my simulation-based application.  Maybe it was from extra inlining?

it all connects together. final disables virtual. that in turn allows inlining. after inlining about a brazillion optimizations apply. after those yet another brazillion optimizations apply. some compilers even do some fixed point iteration shit to figure out the best order and sequence of applying optimizations.

this is all an entangled mess making predictions unreliable like shit. measuring on any concrete case (like the op has done) does little in the way of predicting performance improvements for other code.



More information about the Digitalmars-d mailing list