For debugging I have many calls to a debug log function in my application. Of course in the production version these debugging calls need to be skipped. Instead of writing:
#if DEVEL == 1
Log::debug(...);
#endif
around all calls to the debug function I decided the write the following in the debug function itself:
#if DEVEL != 1
return;
#endif
Will the overhead of the useless function call be avoided by the compiler or am I better off by using (many ugly) #if #endif construction for performance reasons?