Isaac Gouy ha scritto: >>The modification consists of unrolling the loops in >>4 methods in the Vector3D class which do vector math. > > > Manual loop unrolling is one optimization too many. > > We have a preference for plain vanilla programs - we're trying to > compare language implementations, not programmers. I think there is a thing that you may have not noted and could make your ideas change. As far as I can tell, the loop unrolling that was done makes the ruby program actually more similar in implementation to what the other already are. The Java and C# code is full of: bodies[i].x += something with bodies[i].x; bodies[i].y += something with bodies[i].y bodies[i].z += something with bodies[i].z; while the original ruby code used the inherited Enumerable methods (inject, map et al), wich rely on the ability of struct classes to enumerate it's fields, doing things like[1]: bodies[i].method {|v| something with v} This way the code becomes cleaner and maybe more idiomatic, but it suffers from a lot more variable creations than it actually needs, and it is more similar to Java code where you'd use getDeclaredFields or something like that. Thus, I think this thing does not qualify as a too clever optimization, and it should be included in the shootout. Oh, and sorry for posting here, I'll join the SO ml as soon as possible since I have some more comments. [1] actually the computation in ruby code is done in the Vector3d class, so it's more like: body.something_with