From: Chad Perrin Date: 2006-07-28T14:17:23+09:00 Subject: Re: For performance, write it in C On Fri, Jul 28, 2006 at 11:05:11AM +0900, John W. Kennedy wrote: > Chad Perrin wrote: > >The canonical example for comparison, I suppose, is the Java VM vs. the > >Perl JIT compiler. In Java, the source is compiled to bytecode and > >stored. In Perl, the source remains in source form, and is stored as > >ASCII (or whatever). When execution happens with Java, the VM actually > >interprets the bytecode. Java bytecode is compiled for a virtual > >computer system (the "virtual machine"), which then runs the code as > >though it were native binary compiled for this virtual machine. That > >virtual machine is, from the perspective of the OS, an interpreter, > >however. Thus, Java is generally half-compiled and half-interpreted, > >which speeds up the interpretation process. > > Huh? Small-system (PDA, etc.) Java implementations may use bytecode > interpreters, but the mainstream ones started out using JIT, and were > later upgraded to start execution by interpreting, and then, if and when > it observes that a given segment is being repeatedly executed, compile > it to native code. Wait . . . what? When some Java applet (for example) is sent over an HTTP connection to your computer to be executed cient-side, it is NOT just source code. Similarly, when you install a Java application, it too is NOT simply copied onto the system in source code form. It's compiled to bytecode (or whatever the hell you want to call it) and distributed thusly, for the JVM to run it. -- CCD CopyWrite Chad Perrin [ http://ccd.apotheon.org ] unix virus: If you're using a unixlike OS, please forward this to 20 others and erase your system partition.