Java & AI

GPU 400x faster than CPU with Deep Netts using Project Panama

1 min read
Zoran Sevarac at Devoxx presenting A New Hope for Simplified, Accelerated and Scalable AI in Java

Benchmarking AI in Java: GPU 400x faster than CPU with Deep Netts using Project Panama

At Devoxx Belgium 2025, we presented the results of a new benchmark that demonstrates just how far Java has come for AI workloads – especially with the latest improvements in Java 25’s Foreign Function & Memory (FFM) API and the Deep Netts AI platform running natively on GPUs.

Benchmark Setup

We tested VGGNet, a popular convolutional neural network for image classification, implemented entirely in Java using Deep Netts.

The goal: measure how much performance we can gain by moving computation from CPU to GPU using Panama FFM API

Environment:

  • Java 25 – improved FFM stability and throughput
  • Deep Netts AI platform
  • Task: Forward inference on pre-trained VGGNet model

Why Java 25 Matters

Java 25 brings major improvements to Project Panama, especially around:

  • Lower overhead in native memory access
  • More stable and predictable performance under load
  • Streamlined GPU interop – no JNI glue, more clean FFM-based code
  • Better compatibility with high-throughput multi-threaded pipelines

In short: FFM API is now production-ready for high-performance AI.

Benchmark Results

Benchmark results, statistics for 100 measurements: Deep Netts CPU (pure Java), Deep Netts GPU (Panama FFM API), Deep Netts GPU (JCuda) and PyTorch

Why This Matters

This benchmark proves what many Java developers have been waiting for:

Java is not slow anymore – it’s AI-ready and GPU-powered.

With Deep Netts and Project Panama, Java can now:

  • Train and run neural networks on GPU
  • Deploy models in event-streaming systems (Kafka, Flink)
  • Operate at native speed – while staying safe, portable, and JVM-based

JNI was neither easy nor productive. Panama is both easy and productive.

Watch the Devoxx Session

Catch the full presentation and live demo from Zoran Sevarac on YouTube:

👉 Devoxx Belgium 2025 – Java AI on GPU with Deep Netts and Project Panama

Watch on YouTube

What’s Next

The new GPU acceleration feature will be available in the upcoming Deep Netts release in November 2025.

TagsJavaMachine Learning & AI

Try Deep Netts in your Java project.

Pick an edition, download it and run the examples on your own machine.