~/talk

Game of Loom: implementation patterns [...] playing with virtual threads

Talkat Voxxed Days Zurich 2023 · on Thursday, 2023-03-16· [java, concurrency]
slides:none on file

Implements Conway’s Game of Life with CSP channels and runs JMH benchmarks comparing native threads vs virtual threads; virtual-thread runs hit 7× faster on 1k–5k cells, native runs go OOM at 50,000 cells OOM, and average CPU-bound frame time drops from ~2.8s to ~1.9s. Root causes: native does thousands more kernel context switches and steals time, virtuals cause more cache misses, pinning and GC pressure from stacks matter. A custom rendezvous channel yields ~2.5× extra speed; non‑preemptive scheduling creates a non‑preemptive fairness tradeoff.

AI-written summary · about

  1. 0:00Introduction
  2. 0:32Why virtual threads
  3. 3:07Memory footprint
  4. 5:41Do you really want this
  5. 6:54Why virtual thread
  6. 14:43Blocking call
  7. 16:28Context switch
  8. 19:26Not preemptive
  9. 28:14Communication channel
  10. 34:30Frame graph
  11. 39:20Channel implementation
  12. 44:07Conclusions
~/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.