~/talk

Value Classes Heap Flattening - What to expect from JEP 401

Talkat JVM Language Summit 2025 · 2025-08-04..08-06· [java]
links:none on file
slides:none on file

JEP 401 brings value classes that are identity-less and mostly immutable, enabling heap flattening that reduces headers and indirection to improve memory density and GC work; a prototype shows 40M-node binary tree: 4.5s → 2s when C2 and flat arrays align with access patterns. Practical limits include layout padding and a required null marker byte, atomic updates limited to machine-atomic sizes, and runtime gaps where interpreter/C1 require heap buffering while atomic ops ≤64 bits constrain which values get flattened.

AI-written summary · about

  1. 0:00Heap flattening intro and JEP 401
  2. 1:25Why flattening isn’t default
  3. 3:10Memory and GC benefits
  4. 6:04Performance with flattened arrays
  5. 8:11When heap flattening helps and when it doesn’t
  6. 9:17JEP 401 value class changes
  7. 10:01Non-atomicity and tearing
  8. 12:49Atomicity trade-offs
  9. 14:11Nullability impact
  10. 16:02JVM preloading value classes
  11. 17:24Flattened value layouts
  12. 19:10Avoiding unused layout costs
  13. 21:19VM support for new layouts
  14. 22:23Array flattening limits
  15. 23:05Null overhead alternatives
  16. 24:31Future beyond JEP 401
  17. 25:56Q&A: Profiling access patterns
  18. 27:23Q&A: Sealed interfaces flattening
  19. 27:45Q&A: Heap buffering C1/interpreter
  20. 29:31Q&A: Residual pointers C1/C2
  21. 30:17Q&A: Tearing in locked programs
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.