Mixing C and Java for High Performance Computing

By Nazario Irizarry, Jr.

Tests show that a hybrid of Oracle Java and C can open the door to intricate high performance applications in which developer productivity via Java can be traded against the ultimate compute speed attainable with C and native customized libraries.

Download Resources


PDF Accessibility

One or more of the PDF files on this page fall under E202.2 Legacy Exceptions and may not be completely accessible. You may request an accessible version of a PDF using the form on the Contact Us page.

Performance computing software, especially high performance embedded computing (HPEC) software, is typically developed in C for processing as well as infrastructure functionality. Infrastructure includes communications, processor/core allocation, task management, job scheduling, fault detection, fault handling, and logging. C and optimized assembler language libraries are used to achieve the highest processing performance relative to limitations on size, weight, and power dissipation. There has been a trend to move away from dedicated logic and specialty programmable processors to commodity-based processors. As a result, it is now possible to examine more robust software options. Many of these functions, especially infrastructure functions, can be implemented quickly and safely utilizing Java™ frameworks but some doubt that the performance can be satisfactory. Java frameworks have extensive open source and vendor support, and Java's platform independence reduces the need to redevelop functions as hardware and operating systems evolve.

Tests show that the performance of Oracle® Java™ 7 Standard Edition (on Intel processors) can equal that of C for some problems if dynamic object creation is used judiciously and the application can afford a brief start-up and warm-up time. Hybrid Java/C applications make sense and can be designed to perform well. This opens the door to intricate high performance applications in which developer productivity via Java can be traded against the ultimate compute speed attainable with C and native customized libraries.