in reply to Re: Python regex faster than Perl?
in thread Python regex faster than Perl?

Writing off a language on the basis of a single flavor of benchmark yielding modest time differences isn't really sensible. In the vast majority of cases finding a language you are comfortable using and that does what you need fast enough to suit the task at hand is much more important than finding a tool that runs a specific task a little faster.

Note that "comfortable using" extends beyond just you sitting in a dark room coding. It extends to being able to get help when you need it. For that, Perl and PerlMonks leads the field. Sure, there are sites like Stack Overflow, but I haven't found a PerlMonks equivalent site for any other language.

Optimising for fewest key strokes only makes sense transmitting to Pluto or beyond

Replies are listed 'Best First'.
Re^3: Python regex faster than Perl?
by dave93 (Acolyte) on Mar 31, 2025 at 12:49 UTC

    I agree with you, but this comes off as quite a defensive response :P. You don't need to sell me on Perl, I already am sold.

    Perl is stronger at regex and that's the perception of it that I've had for long before I even thought to learn it. In a bullet-point list of Perl's strengths, it'll always come up. It also seems that Perl has had a reputation, in the past, of performing faster than Python (and Ruby). Given this I'm sure you'd understand why I found it surprising that Python performs better in all the simple regex cases I tried.

    edit: I'm not sure about community support for Python, though it does seem stronger to me than you give it credit for. But I'll say that I certainly haven't found Perl lacking and I appreciate PerlMonks.

    Thanks. -- David