On 5 August 2010 22:19, Kieran P <[email protected]> wrote: > Hey, > > I personally use .each, but if you're looking to squeeze every bit of > performance from your app, use for, as it's about 7% faster > than .each. > > http://rubybenchmark.com/reports/12
I can't comment on the accuracy or otherwise of the benchmark itself, but note that even if it is correct then the 7% faster will only be for a virtually empty loop. If you put anything worthwhile in the loop then I expect that any difference between iteration methods will be swamped by the processing of the loop contents. Colin -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

