Are compilers smart enough to detect a no-op function?
- by 0x80
If I write a function like this:
void doMaybeNothing()
{
#ifndef IM_LAZY
doSomething();
#endif
}
Are modern compilers smart enough to detect a no-op function and optimize so that there are no cycles wasted? Or is there always a small performance impact?