Charles Oliver Nutter wrote: > - All the remaining cases showed up as being slower or only slightly > faster than MRI, which is very unusual. So I ran a sampling profile and > that pointed me toward Struct being slower than it should be. Struct > hasn't been updated with many recent optimizations in the rest of the > system, and I'm sure it can be made a lot faster. > > I filed a bug: http://jira.codehaus.org/browse/JRUBY-2220 I haven't completely cleaned it up, but I removed a lot of unnecessary overhead from struct member access. I haven't done anything for the rest of struct yet. Here's numbers comparing before and after in JRuby: http://pastie.org/161223 With these numbers, JUSTIN and PHILIPP are looking a lot better, both convincingly faster than MRI. LIONEL still needs work, so there may be some other bottlenecks involved. I'm certain they should all run faster in JRuby, at any rate. They will. Incidentally, if anyone wants to add/improve my little Struct benchmark, I'd appreciate it. There's precious few standard benchmarks available in the Ruby world. It's bench_struct here: http://svn.codehaus.org/jruby/trunk/jruby/test/bench/ And feel free to improve or add to any of the others as well. - Charlie