In article <6e613a32.0303282059.d94f726 / posting.google.com>, Daniel Berger <djberg96 / hotmail.com> wrote: >Hi all, > >One of the concerns I'm having about Ruby 1.8 is that it appears to be >getting *slower*. Not so much that it will be a serious issue for me, >but Ruby's speed has been something some of the Perl and Python folks >have been using against Ruby. I visited the Great Computer Language >Shootout (http://www.bagley.org/~doug/shootout/), put together 9 of >the functions he used and ran them using both 1.6.8 and 1.8 p2. > >In 7 of the 9 tests, 1.8 was *slower*. Should I be worried? > >Here is a sampling of the results. Complete code at the bottom. I >ran the benchmarks and almost always came up with the same results - >1.6.8 was faster in 7 of 9 tests (and sometimes 8). The one place >where I noticed a massive improvement, however, was in the 'list' >test. > >Dual Pentium II 400 >512 MB RAM >Mandrake Linux 9.0 > ># 1.6.8 > user system total real >Ackermann function: 1.430000 0.000000 1.430000 ( 1.450032) >Array access: 9.010000 0.020000 9.030000 ( 9.139022) >Fibonacci numbers: 8.940000 0.010000 8.950000 ( 9.036173) >Hash access I: 7.260000 0.000000 7.260000 ( 7.241685) >Hash access II: 9.960000 0.060000 10.020000 ( 10.047116) >Lists: 19.250000 0.050000 19.300000 ( 19.398597) >Nested loop: 10.460000 0.010000 10.470000 ( 10.538426) >Sieve of Eratosthenes: 13.880000 0.040000 13.920000 ( 13.926563) >Word Frequency: 2.700000 0.000000 2.700000 ( 2.669599) > ># 1.8.0 preview 2 > user system total real >Ackermann function: 1.560000 0.000000 1.560000 ( 1.545286) >Array access: 10.020000 0.010000 10.030000 ( 10.017142) >Fibonacci numbers: 9.130000 0.010000 9.140000 ( 9.201564) >Hash access I: 7.960000 0.010000 7.970000 ( 8.046752) >Hash access II: 9.780000 0.030000 9.810000 ( 9.939460) >Lists: 2.320000 0.020000 2.340000 ( 2.337373) >Nested loop: 11.850000 0.000000 11.850000 ( 11.849551) >Sieve of Eratosthenes: 15.030000 0.040000 15.070000 ( 15.065020) >Word Frequency: 2.990000 0.020000 3.010000 ( 3.003743) > That is somewhat worrisome... I was hoping we were moving the other direction. Phil