From: Adrian Howard Date: 2006-10-21T18:05:23+09:00 Subject: Re: Ruby and Perl On 21 Oct 2006, at 00:40, Paul Lutus wrote: > Li Chen wrote: > >> Hi guys, >> >> I teach myself some Perl before I change to Ruby. I am just >> curious: If >> I use the same algorithm to write a Perl and Ruby script, >> respectively, >> which one will run faster? Since everyting in Ruby is object or >> reference to an object the script written by Ruby should run >> faster than >> that in Perl's. >> Am I right? > > Another poster has given you the answer, but I am curious about why > you > would think that an object-oriented environment would necessarily > be faster > than one that doesn't have this orientation. [snip] Because some of us have used Eiffel, Smalltalk and Lisp implementations that are pretty darn speedy :-) Hell OO Perl is speedier than Ruby last time I benchmarked. Not that I dislike Ruby. It's fast enough for me, and the decrease in developer time more than make up for any decrease in execution speed. That doesn't mean that Ruby's speed (or lack thereof) is down to it's OO orientation - or that it can't improve (YARV for example). Cheers, Adrian