>>>>> "Eric" == Eric Blake <[EMAIL PROTECTED]> writes:

Eric> However, most Java compiler-writers (myself included) are
Eric> hesitant to add the overhead of extra optimization analysis to
Eric> bytecode compilation when JITs already do it at runtime; and
Eric> neither Sun's javac nor jikes make this particular optimization,
Eric> not even with the -O flag.

If absolutely minimal bytecode is important, then I think the compiler
is where this stuff belongs.  I dislike the approach of obfuscating
the Java source code, because we are adding a maintenance burden
(hard-to-read side effects) in order to gain a benefit which might be
transitory.  For instance, the next generation of Java compilers might
generate better bytecode.

I see this as analogous to the situation in C: in the past some people
wrote C code which generated optimal assembly from their particular
compiler.  As compilers changed, this code went from optimal to merely
average -- except that it was hard to read.

My impression -- and I don't really know, since I inhabit a peculiar
niche in the Java world -- is that the people who care about minimal
bytecode run their bytecode through a post-compilation bytecode
optimizer.

Tom

_______________________________________________
Classpath mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/classpath

Reply via email to