classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Informative throws


From: Tom Tromey
Subject: Re: Informative throws
Date: 30 Jul 2001 13:59:28 -0600

>>>>> "Eric" == Eric Blake <address@hidden> 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]