Kotlin and Azul: Collaboration for Enhanced Runtime Performance

Striving for high application performance For many years, JetBrains has aimed to help developers write high-performance applications by providing tools for development and diagnostics. On the Kotlin team, we pay close attention to performance, offering language features such as inline functions and classes, optimizations in the standard library, thoughtful bytecode generation, and the Kotlin coroutines […]

May 20, 2025 - 18:40
 0
Kotlin and Azul: Collaboration for Enhanced Runtime Performance

Striving for high application performance

For many years, JetBrains has aimed to help developers write high-performance applications by providing tools for development and diagnostics. On the Kotlin team, we pay close attention to performance, offering language features such as inline functions and classes, optimizations in the standard library, thoughtful bytecode generation, and the Kotlin coroutines library, among other initiatives.

A significant contribution to runtime performance comes from the JDK. We believe that viewing these components as an integrated system can bring even greater performance benefits.

We are excited to announce a strategic technical collaboration with Azul, a renowned high-performance JVM provider. Azul has a longstanding reputation in the Java community for delivering JVM innovations that address some of the toughest performance challenges facing JVM-based applications.

Joining forces for JVM performance

This collaboration is driven by a shared vision: by closely examining how Kotlin-generated bytecode interacts with advanced JVM optimizations, we can uncover new ways to enhance runtime performance. Azul’s deep JVM expertise, combined with Kotlin’s ability to control bytecode generation, offers a unique opportunity to optimize the entire execution stack.

Ultimately, our collaboration aims to benefit both specialized high-performance JVM implementations (like Zing) and standard JVMs such as OpenJDK, thus helping all Kotlin users achieve better performance out of the box.

Our first Step: Establishing clear benchmarks

First, we needed to verify that existing features of the Zing JDK (also known as Azul’s Platform Prime product) positively impact Kotlin applications. We selected a Kotlin project from the widely respected TechEmpower Framework Benchmarks, which reflect typical backend workloads. The test exercised the ORM, database connectivity, dynamically sized collections, sorting, server-side templates, and other standard operations. Additionally, we implemented an application that performs CPU-intensive and memory-intensive operations. We ran these applications using different JDKs – standard OpenJDK and the high-performance Zing JDK – and tested them under high load.

Early results from this effort have already shown significant promise. The chart below illustrates the improvement in performance metrics when using the Zing JDK compared to OpenJDK.

TechEmpower testCPU-intensive testMemory-intensive test
Latency Avg23.9%28.0%27.8%
Throughput30.5%39.0%38.1%
Test environment
Zing JDK version: zing25.02.0.0-2-jdk11.0.26

OpenJDK version: 21.0.7
JVM run config: -Xms2g -Xmx2g
Hardware config: AWS EC2, 8 vCPUs, 16GB
OS: Amazon Linux 2023

Standard deviation for throughput remained within 15%. 

Apart from using different JDKs, the test machines were identical. The performance enhancements observed can be attributed to key Platform Prime technologies:

  • Falcon JIT compiler: Utilizes LLVM-based optimization techniques, enabling deeper optimizations and improved throughput. This directly enhances the execution efficiency of bytecode generated by the Kotlin compiler.
  • C4 Pauseless Garbage Collector: Continuously manages memory concurrently without “stop-the-world” pauses, significantly reducing latency spikes and maintaining consistent response times, particularly beneficial for coroutine-intensive Kotlin applications.

Next steps: Deeper exploration and optimization

Encouraged by these findings, our next objectives are:

  • To expand benchmark coverage by adding various real-world use cases. The Azul team will also add Kotlin projects for regular testing of their JDK distributions.
  • To delve deeper into potential bytecode-level optimizations within the Kotlin compiler itself. The Azul engineering team will advise us on JVM requirements for bytecode optimizations. With this data, Kotlin’s compiler team will explore targeted changes in bytecode generation that could further boost runtime performance.

Join our journey

We invite the Kotlin community to participate in this exploration of runtime performance. What kinds of optimizations have worked for you? How does your application behave under load? Share your stories about achieving high runtime performance. If you’re curious, try running your server-side Kotlin applications on Platform Prime and observe how it performs in your environment.

Upcoming webinar: Dive deeper into JVM performance

Stay tuned for our upcoming joint Kotlin-Azul webinar, where our engineers will present practical optimization strategies covering the entire technology stack – from the JVM platform to web application frameworks. We’ll be announcing registration details soon.