Thu, 31 Jan 2002 04:33:25 GMT

by Charles Miller on January 31, 2002

Found in a comment on JavaLobby, which I rarely visit because the noise and rabid advocacy overwhelm any attempt at serious discusson, a link to a DeveloperWorks article on The pros and cons of generating native code from Java source.

Summary of the findings - compiling Java bytecodes into native code for execution may make a program faster. It may also make it slower. JVM-executed Java tends to use more memory than natively compiled Java, but not very much. Bytecode class-files take up less disk space then natively compiled executables, but only if you ignore the size of the JVM (which is huge).

Why is this important? Well, one of the differences between the compilation model of Java and Microsoft's Common Language Runtime (into which C# is compiled, for example) is that the CLR natively compiles everything before execution. These tests show that on the Java side, such an approach would give no appreciable benefit, from which we can extrapolate that it probably doesn't help C# much either.

Previously: Thu, 31 Jan 2002 04:16:38 GMT

Next: Fri, 01, Feb 2002 11:02:00 AM