view · edit · sidebar · attach · print · history

Comparing Ruby 1.8 vs Ruby 1.9

<< Beginner | Index | CompileOptiosfor19 >>

Attach:test.rb from Masa

Now run

 ruby18 test.rb

results in

1.8.6:
100000000
55.5480198860168
"end"
 ruby1.9 test.rb

results in

1.9.3-dev:
100000000
14.717894554138184
"end"

If you want to run 2 processes Ruby-1.9 will take double the time. This is because of the GIL ;)

 ruby1.9 test.rb 2

results in

200000000
29.48723530769348
"end"

To understand better this is useful

 http://www.igvita.com/2008/11/13/concurrency-is-a-myth-in-ruby/
view · edit · sidebar · attach · print · history
Page last modified on March 15, 2011, at 09:08 AM