metautonomo.us

Confounding URL typists since 2007.

Tag Archives: jruby

Benchmarking Ruby’s Enumerable

2 Comments

Lately, I’ve been spending some time filtering data sets in Ruby. A common pattern when filtering data on multiple criteria involves short-circuiting processing at the first match or non-match, depending on whether conditions are being evaluated in an any/or or all/and context, respectively. As a result, I thought I’d run a few quick benchmarks on several implementations of this pattern. The results surprised me, so I thought I would share them here. Read the rest of this post

Filed under Blog
Jul 16, 2011