GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Regression in re.compile() performance · Issue #161125 · python/cpython

Regression in re.compile() performance #161125

New issue
Copy link
New issue
Copy link
Open
Open
Regression in re.compile() performance#161125
Copy link
Labels
performancePerformance or resource usagePerformance or resource usagestdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

Description

@eendebakpt
eendebakpt
opened on Nov 1, 2026
Issue body actions

Bug report

The pyperformance regex_compile benchmark is 1.17x slower on main than on 3.15 (1.19x on the free-threaded build). Bisecting points at the gh-152100 series (GH-152153, GH-152154, GH-152214). The regression is also visible on regex_compile on speed.python.org

The reason is redundant work in the case that no fusable constructs are present. Claude has several suggestions, one is in https://github.com/eendebakpt/cpython/tree/re-optimizer-skip-pass.

@serhiy-storchaka

CPython versions tested on:

CPython main branch

Operating systems tested on:

Linux

Linked PRs

  • gh-161125: Avoid redundant work in regex compilation #161600

Activity

  1. eendebakpt
    added
    type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
    performancePerformance or resource usagePerformance or resource usage
    stdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directory
    on Nov 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    performancePerformance or resource usagePerformance or resource usagestdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.