Five Things about Java You Didnt Know
summary
Shows that escape analysis moves objects to the stack, so short‑lived StringBuilder and String instances disappear after JIT warmup (first run creates ~50k objects, later runs create none) because C2 inlines and eliminates allocations after ~10k–50k calls. Demonstrates Speedment maps Java streams to SQL and off‑heap stores, letting streams compile to indexed queries and storing terabytes off‑heap (unsafe or ByteBuffer serializers) with near‑memory access latency (example: a count in ~116 ns), and explains tradeoffs, serialization, and when off‑heap unsafe code is justified.
AI-written summary · about
chapters (9)
- 0:00Introduction to Java features
- 1:03Speaker background and Speedment
- 2:08Java 1.0 and identifier shortening
- 3:10Objects on the stack and escape analysis
- 12:30Proper performance testing with JMH
- 17:08Short-circuit stream performance
- 23:25Holding terabytes of data off-heap
- 33:59Live coding demo with Speedment
- 38:28Q&A session
