James Edward Gray II wrote: > On Jul 30, 2007, at 9:35 AM, Alex Young wrote: > >> Gregory Brown wrote: >>> On 7/30/07, Alex Young <alex / blackkettle.org> wrote: >>>> Benchmark.bmbm(20) do |x| >>>> x.report("if"){for i in 0..1000000 do >>> Yuck! >>> 1000000.times do ... end >> Meh. > > It has nothing to do with timing. It's about ugly verses pretty. :) To be perfectly honest, I had it fixed in my head that for...in... was faster than N.times {} when I wrote the original code, and was just trying to get rid of an unnecessary overhead. Just shows what use assumptions like that are... -- Alex