Virtual Functions and Performance C++
Before you cringe at the duplicate title, the other question wasn't suited to what I ask here (IMO). So. I am really wanting to use virtual functions in my application to make things a hundred times easier (isn't that what OOP is all about ;)). But I read somewhere they came at a performance cost, seeing nothing but the same old contrived hype of premature optimization, I decided to give it a quick whirl in a small benchmark test using: CProfiler.cpp #include "CProfiler.h" CProfiler::CProfiler(void (*func)(void), unsigned int iterations) { gettimeofday(&a, 0); for (;iterations > 0; iterations