Page MenuHomePhabricator

Investigate whether Python regex is faster when non-capturing, use consistently.
Open, LowPublic

Description

The manual is explicit that non-capturing, parenthesized groups are not a performance benefit over their capturing brethren.

It should be mentioned that there’s no performance difference in searching between capturing and non-capturing groups; neither form is any faster than the other.

Let's drop the few non-capturing prefixes in revscoring/languages/*, and document before it becomes an anti-pattern.

On the other hand, we might discover that non-capturing does have a benefit, something the Internet anecdotally supports. Either way, make our code consistent.

Event Timeline

awight created this task.Jul 6 2017, 3:37 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJul 6 2017, 3:37 AM
awight triaged this task as Low priority.Jul 6 2017, 3:38 AM
awight updated the task description. (Show Details)
Restricted Application added a project: artificial-intelligence. · View Herald TranscriptAug 3 2018, 11:56 AM
awight removed a subscriber: awight.Mar 21 2019, 4:01 PM