On 19.08.2009 15:31, Ben Christensen wrote:

> http://benjchristensen.com/2009/08/18/initial-impressions-on-ruby-performance/

1.9* is significantly better.  I did not try JRuby yet.

robert@fussel /cygdrive/c/Temp/frp
$ /cygdrive/c/Programme/Java/jdk1.6.0_14/bin/javac FileReadParse.java

robert@fussel /cygdrive/c/Temp/frp
$ java -cp . FileReadParse
Starting to read file...
The number of tokens is: 1122
It took 16 ms

robert@fussel /cygdrive/c/Temp/frp
$ allruby file_read_parse.rb
ruby 1.8.7 (2008-08-11 patchlevel 72) [i386-cygwin]
Starting to read file ...
The number of tokens is: 1122
It took 3.0 ms
ruby 1.9.1p129 (2009-05-12 revision 23412) [i386-cygwin]
Starting to read file ...
The number of tokens is: 1122
It took 2.0 ms

robert@fussel /cygdrive/c/Temp/frp
$ wc file_test.txt
  190 1114 7579 file_test.txt

robert@fussel /cygdrive/c/Temp/frp
$


====================================================================


robert@fussel /cygdrive/c/Temp/frp
$ !w
wc file_test.txt x
   95000  557000 3789500 file_test.txt
   68970  404382 2751177 x
  163970  961382 6540677 insgesamt

robert@fussel /cygdrive/c/Temp/frp
$ java -cp . FileReadParse
Starting to read file...
The number of tokens is: 561000
It took 359 ms

robert@fussel /cygdrive/c/Temp/frp
$ !a
allruby file_read_parse.rb
ruby 1.8.7 (2008-08-11 patchlevel 72) [i386-cygwin]
Starting to read file ...
The number of tokens is: 561000
It took 1395.0 ms
ruby 1.9.1p129 (2009-05-12 revision 23412) [i386-cygwin]
Starting to read file ...
The number of tokens is: 561000
It took 872.0 ms

robert@fussel /cygdrive/c/Temp/frp

robert@fussel /cygdrive/c/Temp/frp
$ /cygdrive/c/Programme/Java/jdk1.6.0_14/bin/java -server -cp . 
FileReadParse
Starting to read file...
The number of tokens is: 561000
It took 515 ms

robert@fussel /cygdrive/c/Temp/frp
$

Cheers

	robert

-- 
remember.guy do |as, often| as.you_can - without end
http://blog.rubybestpractices.com/