Regular Expressions - Python vs Perl

djw dwelch at vcd.hp.com
Thu Apr 21 12:34:54 EDT 2005


Thomas Bartkus wrote:
> "codecraig" <codecraig at gmail.com> wrote in message
> news:1114098472.768814.281750 at g14g2000cwa.googlegroups.com...
> <snip>
> 
>>Well so far from what I have found, Perl is faster than Python for
>>RegEx, although perl is harder to read.
> 
> 
> Yawn
> 
> How about Python being easier to *write*?
> 
> It never ceases to amaze me.  It takes days, weeks, months, sometimes even
> years to write significantly useful software.  And yet so many seem to think
> it is worthy to bother over the seconds that might be saved at execution
> time.
> 
> If one were to achieve a mere percentage point or two in improving the
> "write" efficiency of software - think how much more the world gains in
> software quality and quantity.  How about man hours saved?  Why does anyone
> still waste so much angst over execution speed?
> 
> I doubt the total execution time for all the RegEx queries you ever ran took
> as much time as you just wasted on your little experiment.
> Thomas Bartkus
> 
> 
While I agree with (most of) your points, one should not overlook the 
fact that there are cases when performance does matter (huge datasets 
maybe?). Since the OP didn't indicate why performance was important to 
him/her, one cannot assume that its not a valid concern.

-Don



More information about the Python-list mailing list