next up previous
Next: References Up: A Note on Native Java Previous: Linpack Benchmark

Conclusions

 In this research note, we have explored the potential of extending the Java Application Programming Interface (API) with a native implementation of Level 1 BLAS to improve the performance of certain mathematical operations in Java programs. Because, in first instance, a Java implementation of the primitives can be provided, the portability of Java is maintained. We have shown that for implementations of the Java Virtual Machine (JVM) that support `just-in-time compilation' (JITC), providing straightforward native Level 1 BLAS already suffices to obtain performance that is close to the performance of native C code for $\Theta(N)$,$\Theta(N^2)$, and $\Theta(N^3)$ mathematical operations. In case JITC is not supported, the performance difference of the latter operations is more profound, and here it would be desirable to provide higher level primitives as well. In addition, we have shown that, on multi-processors, combining native Level 1 BLAS with the multi-threading mechanism of Java may provide a simple and portable way to obtain a Java program that runs faster than compiled serial C code.

In conclusion, although it is obvious that more speedup can be expected by providing highly optimized native implementations of a broad range of mathematical primitives, in which characteristics of the target machine (such as multiple processors, memory hierarchies or vector processing facilities) are fully exploited at native level, providing straightforward native implementations of Level 1 BLAS alone already can help in improving the performance of mathematical operations in Java. In all cases where native methods are used, however, care must be taken with respect to the precision of the computed result, because Java data types are mapped to the nearest matching data types on the native language side.


next up previous
Next: References Up: A Note on Native Java Previous: Linpack Benchmark
ajcbik@extreme.indiana.edu