You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Robin Green <gr...@hotmail.com> on 2000/09/09 14:02:37 UTC
Re: new version of the sql logicsheet under development
"Nicola Ken Barozzi" <ni...@supereva.it> wrote:
>At http://www-i2.informatik.rwth-aachen.de/~markusj/jopt/index.html there
>is a Java class optimizer that reducers size to up to 95% (less
>realistically)
>by:
>[[
>a.. removing debug info
>line number table, local variable table
>b.. removing attributes that are unnecessary for execution
>sourcefile, innerclass, synthetic, deprecated, user-defined
>c.. removing unused private methods and fields
>d.. removing unused entries from the constant pool
>any entry that is not referenced from anywhere inside the class file, e.g.
>the constant_utf8 ``SourceFile'' and the name of the
>sourcefile that were lost when the sourcefile attribute was removed
>e.. optimizing the order of local variable slots
>f.. new: compressing local variable slots
>g.. obfuscating private method- and fieldnames
>the new names are usually shorter than the old ones, so the optimized class
>file is also shorter
>optimizing the bytecode in different ways
> a.. removing NOP instructions
> b.. removing GOTO instructions that jump to the following instruction
> c.. redirecting GOTO instructions that jump to another GOTO instruction
> d.. replacing GOTO instructions that jump to a RETURN instruction
> e.. removing dead code
> f.. replacing xSTOREn/xLOADn by DUP/xSTOREn, which can entail other
>optimizations
> g.. new: live variable analysis
> h.. new: constant analysis
Unfortunately only the last 3 (f, g, h) are likely to be useful in cases
like Uli's, where there is just a helluva lot of node creation instructions.
Even then, optimizers sometimes generate code that only works on certain VMs
- destroying cross-platform portability. :(
_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
Share information about yourself, create your own public profile at
http://profiles.msn.com.