This site may earn affiliate commissions from the links on this page. Terms of use.

Java is a programming language that allows developers to write once and deploy everywhere -– from high-end gaming desktops to smartphones. Its OS-agnostic and widespread nature is one of its strongest selling points, but one area where it can fall flat is performance. Generally, Java applications are not going to perform as well as native applications written for a specific OS. However, thanks to Project Sumatra that performance gap may soon become less of an issue.

The OpenJDK-backed project is currently working to harness the parallel processing power of integrated and discrete graphics cards to speed up Java applications. GPU acceleration is not a new concept, but this project is interesting because of the way it works and the future implications of the research.

First revealed in August, Project Sumatra uses the features and libraries of Java 8’s Lambda Project as well as Oracle’s HotSpot for the Java Virtual Machine. (Lambda is a set of expressions for the Java programming language that is intended to improve multi-core support.)

In order to take advantage of GPU acceleration, software developers will need to annotate their code to indicate which lambda expressions are suited to the parallel nature of GPUs. Then, when you run a Java application on a system with an OpenCL-compatible GPU installed, the HotSpot JIT (just-in-time) compiler will translate the annotated bits of code to OpenCL for processing on the GPU rather than the CPU. This is an interesting method as it will require relatively simple updates to applications in order to take advantage of GPU hardware acceleration, and it will be invisible to the end user. Granted, not every application will see massive performance increases — if they can be parallelized at all — but many will be able to benefit from harnessing the GPU to some extent.

The developers behind the Sumatra project are currently focusing on developing OpenCL support with Java 8 technologies, but they expect the development research to influence GPU hardware acceleration with other JVM-hosted languages like JRuby and Scala.

The potential here is impressive, especially considering the proliferation of GPUs capable of running OpenCL code — a number that should continue to grow. AMD and Nvidia have fleets of discrete cards, AMD and Intel have graphics cores integrated into CPUs, and future ARM SoCs may support the technology as well. Future Java versions integrating the technology should allow customers to put their hardware to use as efficiently as possible. AMD APU-based servers, and mobile smartphones and tablets, will benefit from GPU acceleration the most. AMD and the HSA Foundation have similar goals, and have demonstrated increased performance by harnessing the power of the GPU for parallel tasks. Project Sumatra is further making it easier for developers and end users of programs written in Java to realize those potential performance gains.

Oracle Vice President of Software Development for the Java Platform Group, Georges Saab, has stated that “We expect our work with AMD and other OpenJDK participants in Project ‘Sumatra’ will eventually help provide Java developers with the ability to quickly leverage GPU acceleration for better performance.”

On the mobile side, we have tablet processors like AMD’s Z-60 APU and upcoming Valley View SoCs from Intel that would benefit from GPU accelerated Java by being able to process data faster and return to a lower-power idle state to conserve battery. And, of course, the user experience should improve by having applications run faster.

It will likely be at least another year before GPU acceleration is baked into the official Java Runtime Environment, but with Project Sumatra we are well on our way to speeding up Java!

Tagged In

I’m making $86 an hour working from home. I was shocked when
my neighbour told me she was averaging $95 but I see how it works now. I feel
so much freedom now that I’m my own boss. This is what I do, Fox87.com

Simon

Seems even after all these years on, Java cannot leave behind the stigma of being slow. It really isn’t.

This site may earn affiliate commissions from the links on this page. Terms of use.

ExtremeTech Newsletter

Subscribe Today to get the latest ExtremeTech news delivered right to your inbox.

Email

This newsletter may contain advertising, deals, or affiliate links. Subscribing to a newsletter indicates your consent to our
Terms of Use and
Privacy Policy. You may unsubscribe from the newsletter at any time.