On Tue, Jul 3, 2012 at 8:06 AM, Dan Connelly <lists / ruby-forum.com> wrote:
> I ran on my personal Macbook Air with Ruby 1.9.3 and Perl 5.10, and Perl
> was only 2x faster.

cmon, with objects, speed becomes relative...
those who wants just speed can leave ruby...


$ for x in "ruby ruby1.rb" "ruby ruby2.rb" "perl perl1.pl"; do echo
$x;  time $x;echo ; done

ruby ruby1.rb
10000000

real	0m0.875s
user	0m0.930s
sys	0m0.040s

ruby ruby2.rb
10000001

real	0m0.312s
user	0m0.340s
sys	0m0.020s

perl perl1.pl

real	0m0.518s
user	0m0.520s
sys	0m0.000s

botp@u:~
$ for x in "ruby1.rb" "ruby2.rb" "perl1.pl"; do echo \#$x;  cat $x;echo ; done

#ruby1.rb
i = 0
10_000_000.times { i += 1 }
puts i




#ruby2.rb
i=0
while i <= 10_000_000
  i += 1
end

puts i

#perl1.pl
#Perl:
for my $n ( 0 .. 1e7 - 1) {
   $i ++
}