Ruby East

Ruby East, on the whole, was a fine conference. I, and several other conference attendees, noted that the local Ruby conferences seem to be just that: Ruby conferences. They seem to eschew addressing Rails and prefer to discuss a wide range of topcs.

I really like this.

I was among many who expressed disappointment with the high level of abstraction in the RailsConf ‘07 talks. Very few of them got into the weeds, talked about the code, and challenged the listener technically. I’m not sure about the (extremely few) rest of you but I go to these conferences to hear what my peers are doing, why, and determine if I should consider trying new technologies and techniques. For that to occur, I need to obtain at least a certain minimum depth of technical knowledge of a topic. Hoedown (especially) and Ruby East proved satisfying in that regard.

And, of course, there was Werewolf. Travel to exciting conferences, meet new and interesting people, and lynch and/or eat them. Who would imagine that a game involving argument, bluffing, and outright coercion could be such a team building exercise? It was a pleasure meeting, eviscerating, and being eviscerated by everyone.

Anyhow, below are my notes from Ezra’s Ruby East talk – far and away my favorite talk. For more notes from Ruby East, see Giles Bowkett’s notes on Pastie.

symbol to_proc bad

yield vs. yield is MUCH faster

Ruby interpreter optimized for anonymous blocks

inject is twice as SLOW as using each for creating an accumulator. OUCH!

Ezra is using ‘benchmark’ (part of core)

=~ vs match: =~ is faster. match has to create MatchData objects

method invocation vs “send” => similar performance

positional params vs options hash => lots of overhead on the options hash (factor of 5!)

eval is expensive (makes sense)

Rules of thumb:

  • Object creation == expensive
  • Method calls surprisingly expensive

Gem: ruby-prof

  • Profiles arbitrary blurbs of code within a passed in code block
  • Graphical result representation
  • Super cool for profiling bottlenecks in applications

Merb uses about 12MB per VM Merb + Sequel =~ 17MB ActiveRecord bulks it up to 25MB

Event driven mongrel == 2x performance gain

.rubinius -dc When finishing a statement, compiles the expression and spits out the “normalized S expression”, rubinius assembly, and the byte code.

Posted by evan on Monday, October 01, 2007

blog comments powered by Disqus