~/talk

Achieving Fast Method Metaprogramming: Lessons from..

Talkat RubyConf 2021 · 2021-11-08..11-10· [ruby]
slides:none on file

MemoWise is a memoization gem built with benchmark-driven development using benchmark-ips, deliberate GC control and concrete microbenchmarks; it replaces block-based define_method with module_eval string generation, flattens and special-cases keys to cut allocations, and uses arrays plus a sentinel array for nil-distinguishing. Benchmarks show large speedups for zero- and one-argument methods, modest gains elsewhere, and a ~3% tradeoff point when falsy results are common; the gem ships and the optimizations measurably improve the data pipeline.

AI-written summary · about

  1. 0:00Start
  2. 4:28Memoize Snippet
  3. 6:26Experiments
  4. 8:27Hypothesis
  5. 9:42Module Eval
  6. 16:03Example Code
  7. 19:31Sentinel Array
  8. 24:09Truthy Optimization
  9. 26:56Ebook on Ruby Garbage Collection
~/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.