#include "performance.h" #include #include struct Benchmark { Benchmark() { calibrate(); _beginTick = _timer.tick(); _endTick = _timer.tick(); } void calibrate(unsigned int numLoops = 100000) { osg::Timer_t beginTick = _timer.tick(); for(unsigned int i=0;i=1.0) std::cout<=0.001) std::cout<=0.000001) std::cout<(vm4))->method(), iterations) RUN(benchmark, (static_cast(vm4))->method(), iterations) RUN(benchmark, { VirtualMethod mm; mm.method(); }, iterations) RUN(benchmark, { VirtualMethod2 mm; mm.method(); }, iterations) }