Java, Machine Learning & AI

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

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

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

What’s Next

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