C
Chris
I'd like to leave some debugging functions in my code like this:
static final boolean DEBUG = true;
if (DEBUG) {
// do stuff here
}
Certain sections of my code are truly time-critical (and yes, I've
benchmarked it, and any delay is a problem). If I leave the debug code in
the app and set the static final DEBUG constant to false, will there be any
overhead? Is the compiler smart enough to omit the debug code altogether
when loading the class?
static final boolean DEBUG = true;
if (DEBUG) {
// do stuff here
}
Certain sections of my code are truly time-critical (and yes, I've
benchmarked it, and any delay is a problem). If I leave the debug code in
the app and set the static final DEBUG constant to false, will there be any
overhead? Is the compiler smart enough to omit the debug code altogether
when loading the class?