Project Lilliput - Beyond Compact Headers
summary
Project Lilliput compresses Java object headers from ~12 bytes to 8 bytes (Lilliput 1) and aims for 4 bytes with Lilliput 2 by using tiny class pointers and compact identity hash code. Implementation adds lightweight locking, a side table for object monitors, sliding GC forwarding, and tighter class-pointer compression (22→19 bits), addressing ~500k near-encodable classes with a far-class indirection for outliers. Identity hash codes move from a 31-bit per-object slot to an on-demand three-state scheme that allocates per-object slots during GC. Code lives in the OpenJDK Lilliput repo and targets JEP 450.
AI-written summary · about
chapters (6)
- 0:00Introduction to Lilliput
- 0:42Memory layout demonstrations
- 7:01Lilliput 1 recap
- 15:03Tiny class pointers
- 30:10Compact identity hash codes
- 46:18Summary and future outlook
related talks
51mProject Lilliput - Compressed Object Headers
56mProject Lilliput: Shrinking Object Headers in the HotSpot JVM
44mLilliput on the horizon
40mSave Java memory
20mCache Me If You Can: Speed Up Your JVM with Project Valhalla
45mMinimal Values Under the Hood
47mLegal JVM Doping in Your Containers
31mValue Classes Heap Flattening - What to expect from JEP 401
