• Home
  • Search
  • An efficient native function interface for Java
  • Cite Icon18
  • https://doi.org/10.1145/2500828.2500832Copy DOI Icon

An efficient native function interface for Java

  • Sep 11, 2013
  • Matthias Grimmer +4 more
Show More
  • Abstract
  • Literature Map
  • References
  • Citations
  • Similar Papers
Abstract

We present an efficient and dynamic approach for calling native functions from within Java. Traditionally, programmers use the Java Native Interface (JNI) to call such functions. This paper introduces a new mechanism which we tailored specifically towards calling native functions from Java. We call it the Graal Native Function Interface (GNFI). It is faster than JNI in all relevant cases and more flexible because it avoids the JNI boiler-plate code.GNFI enables the user to directly invoke native code from Java applications. We describe how GNFI creates call stubs for native functions that a just-in-time (JIT) compiler can optimize and how we embed these stubs into Java code. We introduce different approaches for calling native functions from within compiled and interpreted Java code. In particular, we describe how our approach embeds the call stubs into a Java application so that the JIT-compiled code consists of a direct call to a native function.We evaluate the call overhead of GNFI. The measurements demonstrate a significant performance advantage of GNFI compared to JNI and the Java Native Access (JNA). Also, we evaluate our approach against JNI and JNA on a jblas matrix multiplication benchmark. The evaluation shows that GNFI outperforms JNI and JNA in compiled and interpreted mode by a factor of 1.9 in the best case.

Similar Papers
  • Conference Article
  • Citations3

JUSTGen: Effective Test Generation for Unspecified JNI Behaviors on JVMs

  • May 01, 2021
  • Sungjae Hwang +3
  • Conference Article
  • Citations12

JUSTGen: Effective Test Generation for Unspecified JNI Behaviors on JVMs

  • May 01, 2021
  • Sungjae Hwang +3
  • Research Article

Comparative evaluation between Java application using JNI and native C/C++ application running on an Android platform

  • Jan 01, 2025
  • ITEGAM- Journal of Engineering and Technology for Industrial Applications (ITEGAM-JETIA
  • Bruno Raphael Cardoso Dias +2
  • Research Article
  • Citations3

Evaluating the Java Native Interface (JNI)

  • Apr 01, 2018
  • International Journal of Distributed Systems and Technologies
  • Stelios Sotiriadis +3
  • Conference Article
  • Citations2

A heuristic fuzz test generator for Java native interface

  • Aug 26, 2019
  • Jinjing Zhao +5
  • Research Article
  • Citations1

JNI light: an operational model for the core JNI

  • Nov 10, 2014
  • Mathematical Structures in Computer Science
  • Gang Tan
  • Book Chapter

Chater Eight - JNI Layer

  • Jan 01, 2003
  • Embedded FreeBSD Cookbook
  • Paul Cevoli
  • Conference Article
  • Citations1

JNICodejail

  • Sep 11, 2013
  • Behnaz Hassanshahi +1
  • Conference Article
  • Citations1

Dynamic symbolic execution of Java programs using JNI

  • Sep 01, 2017
  • Sergey Vartanov
  • Research Article
  • Citations12

Using the Java Native Interface

  • Nov 01, 1997
  • XRDS: Crossroads, The ACM Magazine for Students
  • S Fouzi Husaini
  • Research Article
  • Citations2

Java Optimization for Superscalar and Vector Architectures.

  • Jan 01, 2005
  • The Journal of Object Technology
  • Douglas Lyon
  • Conference Article
  • Citations7

JNI program analysis with automatically extracted C semantic summary

  • Jul 10, 2019
  • Sungho Lee
  • Conference Article
  • Citations16

Efficient Java Native Interface for Android Based Mobile Devices

  • Nov 01, 2011
  • Yann-Hang Lee +2
  • Research Article
  • Citations12

Jinn

  • Jun 05, 2010
  • ACM SIGPLAN Notices
  • Byeongcheol Lee +4
  • Conference Article
  • Citations44

Jinn

  • Jun 05, 2010
  • Byeongcheol Lee +4
Cactus Communications logo

Copyright 2026 Cactus Communications. All rights reserved.