From: Dmitry Nikiforov Date: 2012-02-03T07:20:01+09:00 Subject: Basic Ruby performance Hello all! First, I should point out that I'm new to Ruby, although it seems pretty similar in some regards to JavaScript and Perl. Anyway, I'm not sure if it's normal, or if it's specifics of Ruby on Mac OS X, or if I haven't compiled it properly (although I used rvm to install on my OS X Lion, to have the latest version - Lion comes with 1.8.7 by default, I believe, so I installed 1.9.3), but most things I try to replicate with it that I used Perl to do before run about twice slower. So I ran some basic benchmarks. Here's one example: Ruby: for a in 0..1E8 a*2 end Perl: for $a ( 0..1E8 ) { a*2 } Ruby takes 22 seconds, Perl - 9 seconds to execute this. This is very similar to all other scenarios I tried (one of which is splitting millions of comma separated rows into arrays). I would really appreciate any useful suggestions: I would LOVE to be able to use Ruby for most of the stuff I do (it's not that I don't like Perl, but I love Ruby's syntax :) ) Thanks! -- Posted via http://www.ruby-forum.com/.