From: Charles Oliver Nutter Date: 2010-06-30T05:32:31+09:00 Subject: Re: Multi-cpu and ruby Threading On Tue, Jun 29, 2010 at 3:23 PM, Charles Oliver Nutter wrote: > If with --server on your system JRuby's still slower than IronRuby, > there may be a bug or bottleneck we can repair. I have been meaning to > make blocks faster in JRuby, but they still come with a higher cost > than some other impls. Maybe also worth showing an experimental dynopt flag for JRuby that seem to improve performance dramatically, but at a small cost of some Ruby semantics (backtraces get a little funky, for example): ~/projects/jruby ➔ jruby --server -J-Djruby.compile.dynopt=true thread_bench.rb 1.8.7, java, 2010-06-17 1000 iterations by 1 threads , Duration = 400 ms 500 iterations by 2 threads , Duration = 188 ms 333 iterations by 3 threads , Duration = 192 ms 250 iterations by 4 threads , Duration = 149 ms 200 iterations by 5 threads , Duration = 167 ms 166 iterations by 6 threads , Duration = 214 ms 142 iterations by 7 threads , Duration = 177 ms 125 iterations by 8 threads , Duration = 163 ms 1000 iterations by 1 threads , Duration = 265 ms 500 iterations by 2 threads , Duration = 160 ms 333 iterations by 3 threads , Duration = 186 ms 250 iterations by 4 threads , Duration = 148 ms 200 iterations by 5 threads , Duration = 159 ms 166 iterations by 6 threads , Duration = 151 ms 142 iterations by 7 threads , Duration = 150 ms 125 iterations by 8 threads , Duration = 171 ms ... Hopefully I can land this in JRuby 1.6, but it's on master now. - Charlie