Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JIT Compilers

 
V Bose
Ranch Hand
Posts: 113
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
.java -> gets compiled -> .class file -> gets interpreted.
Where does Just in Time compilation fit in here?
What are HotSpot compilers ?
 
walter wang
Ranch Hand
Posts: 159
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
compile here means compile .class (interpreted) file to executable file into Memory.
JIT compiler is compiler before jdk1.3
after jdk1.3 compiler is called HotSpot compiler
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Where it fits in your line is within the interpreter. Rather than interpret the same code over and over, the JVM (interpreter and more for one low price!) can compile the Java byte code into binary machine code, then execute the machine code. It's a gamble that the time taken to compile will be made up in repeated execution.
You get the benefit that your compile byte code is portable across JVMs from different vendors on different platforms. Some of those JVMs throw in the added benefit of compiling to machine code.
Clever tool builders blur the lines between interpreters and compilers all the time. The REXX language usually has a pure interpreter, no compiler. But some interpreters pre-scan and generate something a lot like byte code. The inventor of REXX advised programmers to not study what he's doing, because about the time they write weird optimized code to work with one interpreter, he'll change it to run better with normal code and their special stuff will be slow again. Great advice!
 
V Bose
Ranch Hand
Posts: 113
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks guys!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic