~/talk

Cache Me If You Can: Speed Up Your JVM with Project Valhalla

Talkat Microsoft JDConf 2024 · 2024-03-27..03-28· [java]
slides:none on file

Project Valhalla adds JEP 401 value classes (classes without identity) and null-restricted value classes to let the JVM flatten objects into dense, cache-friendly layouts; flattening is limited by atomic-access size (often as small as 32 bits) and nullable values can blow up memory (a single null bit can force 32-bit alignment). OpenJ9 prototypes and OpenJDK early access builds exist to test throughput gains for numeric, linear-algebra, and ML workloads; opting into loosely-consistent access allows larger flattened instances at the cost of atomicity.

AI-written summary · about

  1. 0:00Project Valhalla intro
  2. 1:09Memory fetch costs matter
  3. 3:22Cache locality impact
  4. 5:12Java objects memory layout
  5. 7:02Object headers overhead
  6. 8:27Identity-free objects
  7. 10:18Flatten objects for cache
  8. 11:01Value Classes in Valhalla
  9. 13:54Flattened null challenges
  10. 14:42Null-restricted value classes
  11. 16:31Atomic access relaxation
  12. 17:16Value class takeaways
  13. 18:27Experiment with Valhalla
~/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.