Results 1 to 3 of 3

Thread: Performance in Java

  1. #1
    Junior Member
    Join Date
    Apr 2008
    Answers
    3

    Angry Performance in Java

    I have found that java applications are very slow when compared to C/C++ applications. Even when the garbage collection is occurring, the processing time of methods is indicating 0 , the java application which is jni based and uses the C/C++ code, runs very slowing. Could anyone explain the cause for slow performance of java


  2. #2
    Junior Member
    Join Date
    Dec 2007
    Answers
    3

    Re: Performance in Java

    Hi,
    The average performance of Java programs has increased a lot over time, and Java's speed is now comparable with C or C++. In some cases Java is significantly slower, in others, significantly faster.

    Following are some reasons for slow performance of java :

    1. Java startup time is often much slower than for C or C++, because a lot of classes (and first of all classes from the platform Class libraries) must be loaded before being used.
    It seems that much of the startup time is due to IO-bound operations rather than JVM initialization or class loading (the rt.jar class data file alone is 40 MB and the JVM must seek a lot of data in this huge file).

    2. Java memory usage is heavier than for C or C++, because the Java Library must be loaded prior to the program execution, because both the Java binary and native recompilations will typically be in memory at once, and because the virtual machine itself consumes memory.

    3. Performance of trigonometric functions can be bad compared to C, because Java has strict specifications for the results of mathematical operations, which may not correspond to the underlying hardware implementation.

    4. The Java Native Interface has a high overhead associated with it, making it costly to cross the boundary between code running on the JVM and native code.

    Regards,
    Hari


  3. #3
    Junior Member
    Join Date
    Apr 2008
    Answers
    3

    Unhappy Re: Performance in Java

    Hello Harry,

    I am trying to find ways to improve the performance of my application. How do I fine tune my application


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.
Interact