Performance has been an important
issue for Java developers with any language. Performance includes both speed of
execution and the memory, the process, occupies. That is, how to make our
program run faster and at the same time using less memory and disk space. There
is no correct formula on performance because different applications have different
characteristics and bottlenecks and also performance differs across different
hardware, operating systems and development tools like virtual machines and
compilers. Based on the performance issues in Java we can make suitable design and
implementation options for specific tasks.
Most of the latest versions of Java
tools offer various approaches to increase performance compared to the basic
JDK1.0 version of byte code interpretation. The tools approaches includes
compiling the bytecode into machine code at runtime. Some areas where
performance enhancement can be done include a) methodinlining and adaptive inlining
where methods are inlined basing on their use and number of calls b) synchronization c) compiling
Java source code into native code of
the operating system etc. As a designer, examining and choosing of appropriate
tools is also important. Using a JVM with built-in JIT compiler increases the performance 40 times.
Choosing the right tool is very important rather than trying to tune the code
for performance aspects.
Most of the times the programmer
writes the code without providing the default constructor. If the programmer does not provide his own
default constructor, the JVM creates one and supplies and this takes time. So,
always provide a default constructor in your program.






0 comments:
Post a Comment