View Single Post
  #11  
Old 10-15-2009, 08:35 PM
sam_midkiff sam_midkiff is offline
Reptilian Rocketeer
 
Join Date: Oct 2007
Posts: 60
Default

Quote:
Originally Posted by CPMcGraw
Sam, that's just a fancy phrase for interpreted scripting. Java is 'pre-compiled' into an intermediate form. But it still means the computer is trying to digest pseudo-code at the instant the program is being run. Conversion from p-code into machine code is still interpretation in my book.

Java may be faster than a 'true' interpreted language, like the early BASICs found on many old machines, but nothing can beat the speed of good compiled code except pure machine code.



I'm a C and C++ zealot, so I do have a bias.

However, I am trying to comprehend Pascal, and I still have great respect for assembler code...


Java VMs actually have a compiler that is invoked at runtime on "hot" procedures to produce native, binary code. It is only done on hot procedures so as to maximize the benefits of doing a compile into native code while minimizing the overhead of compilation. Javac does compile Java source into bytecodes, which are, in most VMs initially interpreted (although IBM Research's Jikes/Jalapeno immediately did a fast translation to binary form) before being translated to native form. http://suif.stanford.edu/~jwhaley/p...avagrande99.pdf gives a good overview of the IBM Jikes/Jalapeno VM. (Just to confuse things, there is also a Jikes Java source to bytecode compiler that also originated at IBM Research.)

Python (from my understanding) follows the example you give of compiling into a faster-to-interpret bytecode form, and not going any further.

Sam
Reply With Quote