Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7184511
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T18:13:00+00:00 2026-05-28T18:13:00+00:00

I saw in the wiki page http://en.wikipedia.org/wiki/Comparison_of_regular_expression_engines that python use non-recursive implementation as grep

  • 0

I saw in the wiki page http://en.wikipedia.org/wiki/Comparison_of_regular_expression_engines

that python use non-recursive implementation as grep and sed while perl one uses the simple cursive impl. does this indicate that python’s regex performance is faster than perl’s?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T18:13:01+00:00Added an answer on May 28, 2026 at 6:13 pm

    This is not a direct answer because the answer to the Python v. Perl regex question seems to be “it depends”.

    If you are concerned about regex speed, there are a few things you should look into. One is to use plain search and replace, where possible, instead of regex.

    The other is to use Google’s re2 module, which has good wrappers in a number of languages. In my experience, re2 is about 60% faster than the built-in re module in Python, and where it particularly shines is with “pathological” regex expressions that could take much longer than you’d expect using the built-in module. All this and more is explained here, in the paper by Russ Cox, who developed re2.

    In Python, I use and can vouch for pyre2, a wrapper for re2, which acts as a drop-in replacement for re. A CPAN search shows that re::engine::RE2 appears to serve the same function in Perl.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I saw this text while reading wikipedia( http://en.wikipedia.org/wiki/K-means%2B%2B ) The authors tested their method
I saw many websites saying don't use ORDER BY RAND(), eg http://forge.mysql.com/wiki/Top10SQLPerformanceTips So I
I was looking at this site: http://rosettacode.org/wiki/Fibonacci_sequence#JavaScript and saw this program: function fib(n) {
I am putting together an internal every developer should know wiki page. I saw
I saw this example in php manual page http://www.php.net/manual/en/session.examples.php The example will create a
I saw the presentation http://code.google.com/p/orient/wiki/Presentations . They're talking the product is used on Twitter,
I saw the vim wiki tips and it says that in order to remap
Just saw wiki article ios version history , which says that ios 5 is
I saw this same question for VIM and it has been something that I
I saw that __VIEWSTATE field gets rendered even though I have set the EnableViewState=false

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.