Java Just-In-Time Compiler (JIT)

Posted on 2007-08-08
Last Modified: 2013-12-13
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.
Question by:hamadqtr
    LVL 4

    Accepted Solution

    >> 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



    Author Comment

    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!!

    LVL 4

    Expert Comment

    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.

    LVL 86

    Expert Comment

    >>Because the performance is still bad.

    What makes you think the fault lies with Java? ;-)
    LVL 4

    Assisted Solution

    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.


    Featured Post

    Enabling OSINT in Activity Based Intelligence

    Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

    Join & Write a Comment

    Suggested Solutions

    Title # Comments Views Activity
    hasOne  challenge 59 66
    advance java 4 36
    count8 challlenge 13 69
    network + 7 60
    Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
    Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
    This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.
    The viewer will learn how to use and create new code templates in NetBeans IDE 8.0 for Windows.

    746 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now