Em ter 08 abr 2014, às 23:00:18, Olivier Goffart escreveu: > > Performance-wise, I'd prefer empty functions that get overridden at > > runtime. That's the smallest overhead for when they are not present. > > According to a quick benchmark (attached), it is clearly more efficient to > have: > if (callback) callback(); > where callback is a function pointer than always calling callback even if > it is an empty function.
Thanks for the benchmark. That basically settles it to an implementation like André's suggestion in the other email, except with null pointers for the callbacks in the default case. -- Thiago Macieira - thiago.macieira (AT) intel.com Software Architect - Intel Open Source Technology Center _______________________________________________ Development mailing list [email protected] http://lists.qt-project.org/mailman/listinfo/development
