Hello,
We receive a new PC based on I Core 7 on Windows 7.
So i try to compare the use processors resources of each
Ruby interpretor (JRuby,IronRuby,Ruby 1.9.1 ).
I do the same (stupid) treatment by 1 to 8 threads, and measure
the global duration.
(test program is on attachment)
Here is the result.
c:\usr\ruby\local>jruby thread_bench.rb
1.8.7, java, 2010-05-12
1000 iterations by 1 threads , Duration = 2772 ms
500 iterations by 2 threads , Duration = 2076 ms
333 iterations by 3 threads , Duration = 1884 ms
250 iterations by 4 threads , Duration = 1848 ms
200 iterations by 5 threads , Duration = 1814 ms
166 iterations by 6 threads , Duration = 1755 ms
142 iterations by 7 threads , Duration = 1866 ms
125 iterations by 8 threads , Duration = 1538 ms
c:\usr\ruby\local>ir thread_bench.rb
1.8.6, i386-mswin32, 2009-03-31
1000 iterations by 1 threads , Duration = 2257 ms
500 iterations by 2 threads , Duration = 1305 ms
333 iterations by 3 threads , Duration = 1055 ms
250 iterations by 4 threads , Duration = 880 ms
200 iterations by 5 threads , Duration = 1026 ms
166 iterations by 6 threads , Duration = 940 ms
142 iterations by 7 threads , Duration = 989 ms
125 iterations by 8 threads , Duration = 1098 ms
c:\usr\ruby\local>ruby19 thread_bench.rb
1.9.1, i386-mswin32, 2010-01-10
1000 iterations by 1 threads , Duration = 7318 ms
500 iterations by 2 threads , Duration = 7393 ms
333 iterations by 3 threads , Duration = 7335 ms
250 iterations by 4 threads , Duration = 7367 ms
200 iterations by 5 threads , Duration = 7450 ms
166 iterations by 6 threads , Duration = 7343 ms
142 iterations by 7 threads , Duration = 7349 ms
125 iterations by 8 threads , Duration = 7454 ms
So it's seem that IronRuby has better use of cpus than JRuby ?
Attachments:
http://www.ruby-forum.com/attachment/4825/thread_bench.rb
···
--
Posted via http://www.ruby-forum.com/.