gabriele renzi <surrender_it / remove.yahoo.it> wrote in message news:<6293b0lbejdddpv4rqnvh3sljfsuppc8ha / 4ax.com>... > You can remove the @vars, at the top, leave thos in the method calls. > then remove the useless (). And the useless 'then's and 'return's Thanks - the returns aren't useless ;-) > Next, I believe you could use attr_accessor for *many* variables. And interestingly that makes things somewhat faster. > And use a Task superclass will make the code much shorter I believe :) Yes, I just like to demonstrate the lack of superclass or interface. > Using Array.at(someIndex) is slightly faster than array[someIndex]. Yes, it is. Using integer literals instead of constants made things a little faster too. > And I believe there is a linked list to handle a queue that probably > could be replaced from a normal Array. It could, but it seems to be ~10% slower > Anyway, I believe that code should be rewritten from the specs, more > than just 'ported' from some other language. I'd certainly be interested in seeing other implementations - there are procedural implementations at http://www.lissett.com/ben/bench3.htm Seems like Ruby shows best with an OO style implementation http://www.lissett.com/ben/bench1.htm Phil, Gabriele, thanks for those suggestions.