From: "Mauricio Fernández" Date: 2003-02-28T04:40:41+09:00 Subject: Re: Ruby Optimization (was: Re: Ruby Compile-time ...) On Fri, Feb 28, 2003 at 04:17:26AM +0900, Daniel Carrera wrote: > Alright, it seems that things like contant folding would not be so > significant after all. So when and why is Perl faster than Ruby? > > >From what I've gathered so far: > > * Ruby has faster OO. > * Perl uses Bob Jenkins' hashing algorithm which is supposedly faster. > * Perl has optimized REs. > > Are these last two things the main things that Perl is faster at? I believe the overall picture is best described by saying that in Perl some things are resolved much earlier (even as early as statically...). > We can implement the better hashing algorithm in Ruby. Would it be hard > to use Perl's source to speed Ruby's RE's? matz didn't use Perl's RE engine because it is strongly tied to other things and taking it would mean adopting a sizable amount of Perl's runtime system (I think matz stated that in the LL2 talk). Plus it seems Perl's REs have been hand-crafted in such a way that the mere inspection of the source code would drive any developer to madness. We certainly don't want to lose matz or any of the core language-hackers :) -- _ _ | |__ __ _| |_ ___ _ __ ___ __ _ _ __ | '_ \ / _` | __/ __| '_ ` _ \ / _` | '_ \ | |_) | (_| | |_\__ \ | | | | | (_| | | | | |_.__/ \__,_|\__|___/_| |_| |_|\__,_|_| |_| Running Debian GNU/Linux Sid (unstable) batsman dot geo at yahoo dot com Microsoft is not the answer. Microsoft is the question. NO (or Linux) is the answer. -- Taken from a .signature from someone from the UK, source unknown