~/talk

Making Hash Parallel, Thread-Safe and Fast!

Talkat RubyKaigi 2026 · 2026-04-22..04-24· [ruby, concurrency]
slides:none on file

Implements a new concurrent hash storage in TruffleRuby that switches storage when an object becomes shared, uses lock-free per-bucket lists and a lock-free doubly linked list to preserve insertion order, and gates heavy structure changes with a layout lock (and a lighter variant). On a 65k-key workload with 80% reads 10% writes 10% deletes it scales to 44 threads (~20–22× speedup vs single thread), and single-thread overhead is essentially zero.

AI-written summary · about

  1. 0:00Introduction and motivation
  2. 1:29Challenge and TruffleRuby context
  3. 9:07Why make hash thread-safe
  4. 13:19Hash storage strategies
  5. 16:28Concurrent hash storage design
  6. 17:53Layout lock for synchronization
  7. 20:00Performance and scalability results
  8. 21:43Single-threaded overhead comparison
  9. 22:27Benefits and ecosystem impact
  10. 23:30How to try and contribute
~/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.