In this paper, we report an experiment of developing an
efficient JNI mechanism. In the current JNI implementation,
each call to the JNI is treated as a new call without the
information of its previous history. Thus, a lot of information
collected in previous operations is lost. If this information were
available for the subsequent calls, the execution time of the JNI
can be reduced. For instance, the overhead of searching the
class structure can be avoided, if we can cache the class
structure and the field identifiers of object attributes. Also, the
transfer of data can be simplified if we can pin the memory
address of the object or array that we intend to manipulate.