Performance issues for Multi-language Java applications Paul Murray, Todd Smith, Suresh Srinivas Silicon Graphics Inc Mountain View, CA 94040 {pmurray, tsmith, ssuresh}@sgi.com Matthias Jacob Princeton University Princeton, NJ mjacob@cs.princeton.edu Abstract The Java programming language is increasingly being used to build large-scale multi-language applications. This trend is due to several factors including: * Legacy libraries being wrapped with a Java interface (e.g., Java bindings for OpenGL, Win32, VIA, MPI, etc., ) * Java applications with C/C++/Fortran cores written to address performance issues (e.g., Oil and Gas applications, visual simulations, etc.,). * Servers embedding Java Virtual Machines that allow the development of server plugins in Java (e.g., Apache Web Server and Servlets, Informix Database and Java Datablades etc., ) There are a number of issues both in terms of correctness and efficiency that need to be worked on to make this really viable. In this paper we identify and discuss in depth the following issues: * The strengths and weaknesses of several Native Interface implementations. * The performance implications of interfacing with C/C++ from Java. * Embedding of the Java VM in servers. We present an implementation within our MIPS Just-In-Time compiler that speeds up native interfacing by a factor of 3 to 4 over what is implemented in the standard JavaSoft reference implementation. We also present performance results for interfacing with native code for other platforms such as Linux and NT to help understand the state of the art in native interfacing.