From: Deacon Marcus
Just one small suggestion - if it makes just a little sense for something to
be an interface instead of an abstract class, in the long run it is almost
always better to make it an interface. If, under some conditions and/or JDK
versions, interfaces are noticeably slower, I'd consider it a design bug in
JDK and/or its JIT and assume they'd fix it in near future anyway.
====
HotSpot does a Class Hierarchy Analysis (CHA) that removes the overhead
associated with "virtual" method calls. (Technically, it's only in "most
instances," but if it can't resolve the call to what is, in effect, as
static method call, then you really do need the overhead because you're
doing very dynamic stuff. However, Log4j use certainly doesn't fall into
that category.) Of course, CHA is done in HotSpot and not most JITs, so if
you're using a pre-Java 2 system, J2ME, etc., then you don't get the
advantage of that kind of optimization.
I absolutely agree with Dean, but I work in a J2SE and J2EE environment, so
flexibility and maintainability is more important to me than compatibility
with old VMs or super-tight environments.
-Jim Moore
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]