先日の find_allのindex版( http://qiita.com/pocari/items/0b4e632ef2a2b6a97ba9 )という記事を受けて。 ruby 1.9 ruby 2.0 ruby 2.1 jruby1.7.12 --1.9 jruby1.7.12 --2.0 の5つの環境で速度がどう変わるか調べてみたよ。 わかったこと ※ すべて、今回のベンチマークの範囲の話。一般的かどうかはわからない。 each_with_index.select や flat_map.with_index は、ruby 1.9 → 2.0 → 2.1 と、すごく速くなっている。都合 10倍以上。 CRuby だと、each_with_index と each.with_index は、同じっぽい。 JRuby だと、each_with_index より each.with_index
