~/talk

Reflections on a decade of MoarVM, a runtime for the Raku programming language

Talkat VMIL 2021 · on Sunday, 2021-10-17· [linux-and-operating-systems]
links:none on file
slides:none on file

MoarVM is a C register‑based VM for Raku implemented with NQP that evolves from a simple bytecode interpreter into a runtime with type specialization, deoptimization, multi‑level inlining, on‑stack replacement, a JIT, and basic escape analysis; it uses a generational parallel but stop‑the‑world GC and a separate specializer thread fed by flat logs. Hot VM primitives are removed in favor of a single generalized dispatch mechanism with user‑space dispatchers and resumable dispatch to implement call‑next semantics; specialization gives the largest speedups, JIT helps tight code, and megamorphic sites can be up to 20× slower.

AI-written summary · about

  1. 0:00MoarVM is...
  2. 2:26How I got involved
  3. 2:54Perl 6
  4. 3:53Dynamic language, but...
  5. 4:32Operators are multis
  6. 6:06Meta-programming
  7. 6:49Grammars
  8. 7:27Raku eats itself
  9. 8:41Sounds idyllic...
  10. 9:35Parrot
  11. 12:25A language for MoarVM
  12. 13:22Why register-based?
  13. 14:36Register VM downsides
  14. 16:57Coping with C and a GC
  15. 18:02Object system
  16. 23:35Scarce resources
  17. 25:06Getting started
  18. 26:37Optimizations
  19. 27:38Then crash and burn...
  20. 28:14Deoptimization
  21. 28:57Statistics will do
  22. 29:30Specialization linking
  23. 30:06Inlining
  24. 31:43Machine code
  25. 31:57What helps most?
  26. 33:13Complexity? Bugs!
  27. 33:26Triggering bugs
  28. 35:05Optimization takes time
  29. 35:42Specializer thread
  30. 38:53Mono, poly, mega
  31. 39:43Broken assumptions
  32. 40:40Example: assignment
  33. 42:01Speedup Speed hump
  34. 43:49It's all about dispatch
  35. 44:40Take it all the way
  36. 45:07One opcode
  37. 45:33Dispatch terminals
  38. 46:39Userspace dispatchers
  39. 47:56Dispatch program
  40. 50:44The problem
  41. 51:11Resumable dispatchers
  42. 51:39The resume callback
  43. 52:08Record phase
  44. 53:21Run phase
  45. 54:17A big improvement
  46. 54:56No silver bullet
  47. 55:29Also: longer warm-up
~/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.