Performance comparison between Java and JNI for optimal implementation of computational micro-kernels - Archive ouverte HAL Accéder directement au contenu
Communication Dans Un Congrès Année : 2015

Performance comparison between Java and JNI for optimal implementation of computational micro-kernels

Résumé

General purpose CPUs used in high performance computing (HPC) support a vector instruction set and an out-of-order engine dedicated to increase the instruction level parallelism. Hence, related optimizations are currently critical to improve the performance of applications requiring numerical computation. Moreover, the use of a Java run-time environment such as the HotSpot Java Virtual Machine (JVM) in high performance computing is a promising alternative. It benefits from its programming flexibility, productivity and the performance is ensured by the Just-In-Time (JIT) compiler. Though, the JIT compiler suffers from two main drawbacks. First, the JIT is a black box for developers. We have no control over the generated code nor any feedback from its optimization phases like vectorization. Secondly, the time constraint narrows down the degree of optimization compared to static compilers like GCC or LLVM. So, it is compelling to use statically compiled code since it benefits from additional optimization reducing performance bottlenecks. Java enables to call native code from dynamic libraries through the Java Native Interface (JNI). Nevertheless , JNI methods are not inlined and require an additional cost to be invoked compared to Java ones. Therefore, to benefit from better static optimization, this call overhead must be leveraged by the amount of computation performed at each JNI invocation. In this paper we tackle this problem and we propose to do this analysis for a set of micro-kernels. Our goal is to select the most efficient implementation considering the amount of computation defined by the calling context. We also investigate the impact on performance of several different optimization schemes which are vector-ization, out-of-order optimization, data alignment, method inlining and the use of native memory for JNI methods.
Fichier principal
Vignette du fichier
1412.6765v1.pdf (430.86 Ko) Télécharger le fichier
Origine : Fichiers produits par l'(les) auteur(s)

Dates et versions

hal-01277940 , version 1 (23-02-2016)

Identifiants

  • HAL Id : hal-01277940 , version 1

Citer

Nassim Halli, Henri-Pierre Charles, Jean-François Méhaut. Performance comparison between Java and JNI for optimal implementation of computational micro-kernels. ADAPT 2015 : The 5th International Workshop on Adaptive Self-tuning Computing Systems, Jan 2015, Amsterdam, Netherlands. ⟨hal-01277940⟩
378 Consultations
3358 Téléchargements

Partager

Gmail Facebook X LinkedIn More