On 01/23/2010 04:37 AM, Tim Fox wrote:
FWIW.
In profiling JBoss Messaging a couple years ago, we found out that not
only does the log.debug() (or log.trace()) have an overhead, but the
actual call to log.isDebugEnabled()/ log.isTraceEnabled() had a
measurable impact.
That was a couple years ago. Now, the check amounts to a single compare on
a volatile int; HotSpot should theoretically be able to inline it into a
single machine instruction on x86 at least (though I'm not sure that it
actually does).
- DML