From: "Bartosz Dziewoński" Date: 2012-06-30T05:01:09+09:00 Subject: Re: ruby performance 2012/6/29 Hans Mackowiak : > Bartosz Dziewoński wrote in post #1066673: >> The MRI is, unfortunately, slow as balls, and there's not much you can >> do. For computation-intensive tasks try JRuby or, well, a different >> programmming language. >> >> -- Matma Rex > > if you write shitty code, its still shit in jruby too. > MRI 1.9 is faster then 1.8. Yes, of course 1.9 is faster. Still. Benchmark this for me, would you: 1_000_000_000.times{|a| } It takes 103 seconds to run on my machine. The following code in C++, compiled with -O0, takes four seconds. int main() { for(int i=0; i<1000000000; i++){}; return 0; } (I have verified that the generated assemly code actually runs the loop.) MRI Ruby *is* two orders of magnitude slower than C and often noticeably slower than other interpreted languages and no matter how much you love it, you can't deny it's slow. -- Matma Rex