code running on the JVM and native code. Java Native Access (JNA) provides Java programs easy access to native shared libraries (dynamic-link library (DLLs) on Windows) via Java code only, with no JNI or native code. This functionality is comparable to Windows' Platform/Invoke and Python's ctypes. Access is dynamic at runtime without code generation. But it has a cost, and JNA is usually slower than JNI. User interface Swing has been perceived as slower than native widget toolkits, because it delegates the rendering of widgets to the pure Java 2D API. However, benchmarks comparing the performance of Swing versus the Standard Widget Toolkit, which delegates the rendering to the native GUI libraries of the operating system, show no clear winner, and the results greatly depend on the context and the environments. Additionally, the newer JavaFX framework, intended to replace Swing, addresses many of Swing's inherent issues. Use for high performance computing Some people believe that Java performance for high performance computing (HPC) is similar to Fortran on compute-intensive benchmarks, but that JVMs still have scalability issues for performing intensive communication on a grid computing network. However, high performance computing applications written in Java have won benchmark competitions. In 2008, and 2009, an Apache Hadoop (an open-source high performance computing project written in Java) based cluster was able to sort a terabyte and petabyte of integers the fastest. The hardware setup of the competing systems was not fixed, however. In programming contests Programs in Java start slower than those in other compiled languages. Thus, some online judge systems, notably those hosted by Chinese universities, use longer time limits for Java programs to be fair to contestants using Java. See also Common Language Runtime Performance analysis Java processor, an embedded processor running Java bytecode natively (such as JStik) Comparison of Java and C++ Java ConcurrentMap References External links Site dedicated to Java performance information Debugging Java performance problems Sun's Java performance portal The Mind-map based on presentations of engineers in the SPb Oracle branch (as big PNG image) Java platform Computing platforms Software optimization