Simple GUI Notepad Using Ruby

GUI Notepad Using Ruby Code require 'tk' class Notepad def saveFile file = File.open("note", "w") ...

Wednesday, August 3, 2016

Java Facts

Just In Time (JIT) Compilation:

Java is designed as a interpreted language. Java code is converted into byte code and that is interpreted by JVM. As we know interpreted languages are slows compared to compiled language because compiled code is ore closer to machine architecture. But java seems to have no major issue with its performance because of the
  • Highly optimized byte code, and
  • JIT compilation
Some selected portion of java byte code is converted into machine code on the fly.

Final Method Increases Performance:

In Java we can define a method as final to avoid overriding. And when we do so there is a chance of performance increase. If the final method is short then java will not call the method instead it will copy the byte code of that particular routine at the place of its call. This technique is called inline calls in Java similar to inline function in C++ where we can explicitly define an inline function (although the final decision is made by compiler). For a final method call can be resolved in compiler time called early binding.