News for hackers. Stuff that matters.
Re:The cost of dynamic vs. static dispatch in C++ by vicaya on Thursday December 05, 2013 @12:49PM (#6855836)
This _could_ be another case of premature optimization, as gcc 4.9+ could automagically devirtualize non-overridden virtual functions. icc could do that for years.
Re:The cost of dynamic vs. static dispatch in C++ by nkurz on Thursday December 05, 2013 @07:32PM (#6858479)
That's not the way the phrase 'premature optimization' is usually used. Usually, it means spending time optimizing something that is not a limiting factor, or that otherwise will not make a difference in the final result. Keeping your code simple in the hope that eventually it will become fast is something else, probably falling closer to 'Sufficiently Smart Compiler' http://c2.com/cgi/wiki?SufficientlySmartCompiler.
Re:The cost of dynamic vs. static dispatch in C++ by pmjordan on Thursday December 05, 2013 @01:02PM (#6855908)
Presumably this needs to be done at link-time? (And you'd have to disable it if you're planning to load code dynamically)