I saw the beauty of Ruby Re: 1. Ruby result: 101 seconds , 2. Java result:9.8 seconds, 3. Perl result:62 seconds

Michael Tan wrote:

I always got the almost same results on my laptop: (Pentium M 1.5G, 1G ram). I closed all other programs, Excel, Eclipse, browsers, ...before I ran it.
C:\temp>ruby test.rb

Well, I use the newest CVS version on Pentium 2.8G under Linux:

(flori@lambda:~ 0)$ ruby -v
ruby 1.9.0 (2005-06-25) [i686-linux]

The algorithm was considerely improved since 1.8. That could be an explanation if you still use 1.8.

···

--
Florian Frank

Brad Wilson wrote:

I agree with this.

Ditto.

I also subscribe to the YAGNI performance
principal: there are whole classes of problems for which computational
performance is of minimal impact. For instance, imagine an n-tier
architecture web application with separated web servers and database
servers. The time spent talking to the database over the network
dwarfs the nanoseconds of "loss" in using an interpreted language.

And one more simplistic example, tcp-request-reply

http://shootout.alioth.debian.org/great/benchmark.php?test=tcprequest&lang=all&sort=fullcpu#bench