On Mon, Jan 14, 2013 at 2:54 PM, Na Na <[email protected]> wrote: > I have heard a rumour that using for-in rather than .each involves more > object creation and deletion, but I don't know if that's true. It will > be one of the things I'll be testing to see if it helps improve > performance.
That isn't true. The only difference between a for loop and an each loop is the different scoping. I can't see how iterating would create more objects either way. Can you share a source of that "rumor"? Kind regards robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/ -- [email protected] | https://groups.google.com/d/forum/ruby-talk-google?hl=en
