Perl-python regex-performance comparison

Tino Wildenhain tino at wildenhain.de
Tue Mar 3 12:38:12 EST 2009


Ivan wrote:
> Hello everyone,
> 
...
> 
> 1. Although it is all relatively similar, there are differences
> between regexes of these two. Which do you believe is the more
> powerful variant (maybe an example) ?
> 
> 2. They are both interpreted languages, and I can't really be sure how
> they measure in speed. In your opinion, for handling large files,
> which is better ?
> (I'm processing files of numerical data of several hundred mb - let's
> say 200mb - how would python handle file of such size ? As compared to
> perl ?)
> 
> 3. This last one is somewhat subjective, but what do you think, in the
> future, which will be more useful. Which, in your (humble) opinion
> "has a future" ?

I guess both languages have their use and future. You should come to
your own conclusion when you work with both languages for a while.
I can only say for myself, I know both and prefer python for its
nice straight forward way. And you don't need the hammer (aka regex)
for everything. Several hundred megabytes is not much, you would
work thru them sequentially, that is with python you would almost
exclusively work with generators.

HTH
Tino
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3241 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://mail.python.org/pipermail/python-list/attachments/20090303/ab3d027c/attachment-0001.bin>


More information about the Python-list mailing list