[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 258
  • Last Modified:

Java Just-In-Time Compiler (JIT)

I need more info about Just-In-Time java compilers:

1-      What is the performance improvements?
2-      How to get it?
3-      How to compile code?


Please Do Not POINT me to other experts-exchange answers.  I have spend more than enough time on them and got out with nothing.
0
hamadqtr
Asked:
hamadqtr
  • 3
2 Solutions
 
doraemon-nolifeCommented:
>> 1-      What is the performance improvements?

Normal java class is in bytecode, which is the reason why java slow execution speed.

JIT compiler convert the bytecode to native machine code when run for the first time. For the subsequent call, the native code would be called, which make it run faster.

>>2-      How to get it?
>>3-      How to compile code?

The JIT compiler was first made available as a performance update in the Java Development Kit (JDK) 1.1.6 software release and is now a standard tool invoked whenever you use the java interpreter command in the Java 2 platform release. You can disable the JIT compiler using the -Djava.compiler=NONE

:)


0
 
hamadqtrAuthor Commented:
Do you mean that when I run my java programs under Java 2, I was actually using the JIT? Because the performance is still bad.  I thought it would be close to C++ speed!!

0
 
doraemon-nolifeCommented:
If you are using Java 1.6, the speed should be closed to C++

Java 1.5 is 100% faster than Java 1.42
Java 1.6 is 50% faster than Java 1.5

Since the JIT compile the java bytecode to machine code for first time running, you wouldnt see the performance boost if you are not running the reusable portion.

:)
0
 
CEHJCommented:
>>Because the performance is still bad.

What makes you think the fault lies with Java? ;-)
0
 
doraemon-nolifeCommented:
bad performance could cause by many reasons:
1. Bandwidth problem
2. Poor written query which cause the huge memory consumption
3. Heavy workload (which can be solved by configuring for load balancing)
4. Poor hardware specs
5. Poorly written codes :
    a) Too much String concatenation (should use StringBuffer)
    b) Initialized too much new object (some should be reuse)
    etc..... (too much possibilities to mention)
6. Calling JNI call which memory is not deallocated properly by C/C++ program

I know poor performance is very annoying but you shouldnt put all the blame to JIT, please check with other possibilities.

:)
 
0

Featured Post

Prep for the ITIL® Foundation Certification Exam

December’s Course of the Month is now available! Enroll to learn ITIL® Foundation best practices for delivering IT services effectively and efficiently.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now