I am working on a ruby project which has cpu intensive tasks so I wanted to see what the impact would be of using the ruby 1.9 development version. It is supposed to provide a major performance increase.
The task used in this project crunches a large amount of data using mathematical functions, array sorting/grouping and database writes.
Ruby versions used for this test:
ruby 1.8.6 (2007-03-13 patchlevel 0) [i686-darwin8.10.1]
ruby 1.9.0 (2008-07-25 revision 18217) [i686-darwin9]
A typical run would take 240sec using ruby 1.8 and 205s with ruby 1.9 without any adaptations: A ~15% speed increase!
I dug a little deeper and found that the array.group_by method was performing a lot faster in ruby 1.9 so i wrote this benchmark to test the increase.
Continue reading ‘Ruby 1.8 vs 1.9 group_by performance’
If you follow this blog post by Chris Roos for connecting to Gmail’s pop server with Ruby and encounter an error similar to this one: NoMethodError: undefined method `set_params’ for #<OpenSSL::SSL::SSLContext:0×50fc58>
Here’s the fix: You need an older version of Ruby 1.9’s net/pop library. I found that the latest one working was revision 13778. view it here.
Hope this saves some time for a few people.
The Ruby programming language creeps up as the 9th most popular programming language on the TIOBE Programming Community Index. Slightly overtaking Javascript. Being a Ruby programmer, this is nice news.
To my surprise, the Lua language (portuguese word for moon) jumped up from the 48th place to the 16th. The language was developed in Brazil and is being used more and more in games. I know that the talented developers from Unknown Worlds are using it extensively in their upcoming NS2 game. They even wrote a Lua debugger (decoda) two months ago.