01 / 01

How a Decade of Work Arrives in JDK 28

Project Valhalla, Explained

JVM Weekly

2024

10
Years in Development
One of Java's most ambitious projects finally reaches maturity
03

The Performance Challenge

Why Java needed Project Valhalla

Java's Memory Overhead Problem

  • 01
    Object Header Overhead Every object carries 12-16 bytes of header data, even for simple data carriers
  • 02
    Pointer Indirection Arrays of objects require pointer chasing, hurting cache performance
  • 03
    Generic Limitations Generics cannot work efficiently with primitive types, forcing boxing
  • 04
    Performance Gap Java lags behind C/C++ in memory-intensive numerical computing
05

Project Valhalla

Revolutionizing Java's memory model

Core Innovations

data_object

Value Types

Custom primitive-like types with no identity or header overhead

grid_view

Flattened Arrays

Inline data storage eliminates pointer chasing and indirection

memory

Cache Efficiency

Dense memory layout improves CPU cache utilization dramatically

code

Specialized Generics

Generic types that work efficiently with primitives without boxing

A Decade of Innovation

2014
Project Initiated

Valhalla launched to address Java's memory model limitations

2018
Early Prototypes

First LW1 and LW2 prototypes demonstrated value types potential

2022
JEPs Published

Key proposals formalized: JEP 401 and JEP 402 established

2025
JDK 28 Target

Value types expected to ship as production-ready feature

The Future of Java Performance

Project Valhalla brings Java closer to native performance while preserving platform safety

https://www.jvm-weekly.com
Made with AirSlide
𝕏 in