From: Chris White Date: 2011-09-12T12:18:45+09:00 Subject: Re: Not 2 maps > I just gave a very simple example. > I want to use larger arrays millions of times. > The speed I have now is acceptable. > I was just trying to squeeze a little more out to see if I could. Garbage collection could be part of it, as the GC has to stop for the collection phase, which can interrupt current processing. You can try doing some calculations using the GC module: http://www.ruby-doc.org/core/classes/GC.html You can also disable / re-enable it when doing expensive operations. You can also try another implementation such as Rubinius: http://rubini.us/ or JRuby: http://jruby.org/ I've seen some pretty impressive numbers for mass object creation for rubinius, and the JVM allows you quite a number of optimization options and garbage collection methods. As I mentioned though, you can fall back to creating C extensions to have more precise control over things. Regards, Chris White http://www.twitter.com/cwgem