2012/6/29 Hans Mackowiak <lists / ruby-forum.com>:
> 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