~/talk

This or that? Similar methods & classes in Ruby && Rails

Talkat RailsConf 2024 · 2024-05-07..05-09· [ruby, ruby-on-rails]
links:none on file
slides:none on file

Practical differences matter: Range#cover vs include shows cover about twice as fast on small ranges and massively faster on huge ranges (include drops to ~27.7 it/s), regex choices matter too — match? avoids globals and is faster while =~ and others set Perl-like $~ globals, benchmarks run on Ruby 3.3.0, Mark IPS; monkey patching, class_eval and define_method have different boot/lookup costs; crazy eval-based method calling ends up ~281x slower, so pick the method whose semantics and side effects meet the real need.

AI-written summary · about

  1. 0:00Method vs class differences
  2. 5:51Cover vs include in Ruby
  3. 10:48Regex matching options
  4. 16:06NoMethodError vs NotImplementedError
  5. 18:51Monkey patching vs define_method
  6. 21:39Ruby delegation methods
  7. 28:49Ways to call a method
  8. 33:03Worst string upcase
  9. 35:07Closing
~/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.