Game of Loom: implementation patterns and performance implications playing with
summary
Implements Conway’s Game of Life with CSP channels and measures performance with JMH, flame graphs and ForkJoinPool carriers; virtual threads remove the one‑to‑one OS mapping so 1,000–5,000‑cell runs show ~7× higher throughput and native runs hit ~50,000 kernel context switches while virtual runs show ~10. Virtual stacks are GC‑managed, thread‑locals explode memory, pinning causes carrier blocking, and a hand‑tuned single‑value channel from Francesco yields ~2.5× speedup over the original queue.
AI-written summary · about
chapters (11)
- 0:00Intro
- 0:52What virtual threads are...
- 10:05Virtual threads are syntactic sugar for reactive programming
- 18:27(Possible) issues with Virtual Threads
- 32:50Benchmarking Game of Life
- 35:54Native vs. Virtual Threads - Benchmark Results
- 37:12Mixed-Mode Flame Graphs
- 39:10Native Threads Execution
- 39:52Virtual Threads Execution
- 41:19Native vs. Virtual Threads - Context Switch
- 48:20Thread per cell vs. Thread per core - Benchmark results
related talks
47mGame of Loom: implementation patterns [...] playing with virtual threads
50mGame of Loom: implementation patterns and performance implications
47mGame of Loom 2: life and dead(lock) of a virtual thread
36mA Dev Persepctive on Java Loom
01h 01mProject Loom: Revolution in Concurrency or Obscure Implementation Detail?
47mThe Challenges of Introducing Virtual Threads to the Java Platform - Project Loom
52mSailing Modern Java
57mUnveiling the Magical Power of Java Virtual Threads
