~/talk

Writing Fast Ruby

Talkat RailsClub Moscow 2014 · on Saturday, 2014-09-27· [ruby]
links:none on file
slides:none on file

Argues that simple source-level changes produce real, measurable wins using Benchmark‑ips on Ruby 2.2. Shows concrete swaps that exceed the 12% target: avoid allocating a Proc and call the block directly (often tens of percent, sometimes several× faster), use in-place/hash mutation instead of repeated merge (2×+), use tr instead of gsub for single-char replacements (≈5×), prefer indexed loops for hot code (up to 80% faster). Presents patched examples and recommends benchmarking your version before changing.

AI-written summary · about

  1. 0:00Introduction to optimization
  2. 3:38Optimization levels in Ruby
  3. 11:50Benchmarking tools
  4. 12:57Source code optimization
  5. 17:12Symbols vs blocks
  6. 20:09Optimizing map and flat_map
  7. 23:45Bang methods
  8. 26:54Hash operations optimization
  9. 29:26Replace gsub with tr
  10. 31:55Parallel variable assignment
  11. 33:03Exceptions and flow control
  12. 34:54Index loops vs each_with_index
  13. 37:23Optimization tips
  14. 40:36Ruby community and future
  15. 42:26Q&A
~/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.