Previous Next        Current Page: NeXtMidas Training / Background / Why use Java? (ctd.)
Start Here   
Background   
   - Midas Product Family   
   - What is Midas?   
   - Midas Family Tree   
   - Current Frameworks   
   - Framework Interoperability   
   - The Midas Philosophy   
   - What is NeXtMidas?   
   - NeXtMidas Design   
   - NeXtMidas Benefits/Features   
   - NeXtMidas Option Trees   
   - Why use Java?   
   - Why use Java? (ctd.)   
   - Why use Java? (ctd.)   
Common Midas Concepts   
Getting Started - Part 1   
Getting Started - Part 2   
Working with Files   
Option Trees   
Macros - Part 1 (Basics)   
Macros - Part 2 (Graphics)   
NetBeans - Part 1 (Setup)   
NetBeans - Part 2 (GUIs)   
NetBeans - Part 3 (Profiler)   
Eclipse - Part 1 (Setup)   
Eclipse - Part 2 (GUIs)   
Primitives   
Applets & WebStart   
Maps & Imagery   
X-Midas Interoperability   
RMIF & Remoting   
Installing NeXtMidas   
Support & Maintenance   
File Handlers   


  • Why use Java? (Continued)
    Java has Automatic Memory Management.
    Automatic Memory Management (or a Garbage Collector) eliminates the need to destroy or free up resources when done. - Simplifies program and eliminates true memory leaks.
    While the Java Garbage Collector uses some CPU time to do its work, it has been shown to improve program performance through better use of available memory (fewer cache misses). - Faster programs!
    Java is fast.
    While very early versions of Java were indeed slow, the new versions are much, much faster.
    Java automatically compiles down to native code at run time (as needed), allowing NeXtMidas DSP programs to run as fast, or faster, than the corresponding X-Midas counterparts.
    Java does not allow users to manipulate pointers nor does it allow arrays to overlap. This eliminates two major optimization problems in C/C++ and Fortran.
    The Java Virtual Machine continuously profiles the running program and will recompile it as needed to optimize it.
X-Midas Users Take Note:
Most people who haven't used Java assume it is a "slow interpreted language." When a Java programs loads up it is initially run in interpreted mode, however the Java Virtual Machine (JVM) profiles the code and automatically compiles any "hot spots" (tight loops, things called often), down to native code. Since Java is more restrictive than C/C++ and Fortran, it is able to optimize this native code more than most C/C++ and Fortran compilers. After compiling down to native code the JVM continues to profile the code and will recompile the code, as needed, to maximize performance. Also, the Java's Automatic Memory Management has been shown to reduce cache misses in a program thereby speeding up memory-access.