Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
9f55551f
Commit
9f55551f
authored
Jul 31, 2019
by
yannvgn
Committed by
Serhiy Storchaka
Jul 31, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bpo-37723: Fix performance regression on regular expression parsing. (GH-15030)
Improve performance of sre_parse._uniq function.
parent
1b29af83
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
7 deletions
+4
-7
Lib/sre_parse.py
Lib/sre_parse.py
+1
-7
Misc/ACKS
Misc/ACKS
+1
-0
Misc/NEWS.d/next/Library/2019-07-31-16-49-01.bpo-37723.zq6tw8.rst
...S.d/next/Library/2019-07-31-16-49-01.bpo-37723.zq6tw8.rst
+2
-0
No files found.
Lib/sre_parse.py
View file @
9f55551f
...
...
@@ -430,13 +430,7 @@ def _escape(source, escape, state):
raise source.error("
bad
escape
%
s
" % escape, len(escape))
def _uniq(items):
if len(set(items)) == len(items):
return items
newitems = []
for item in items:
if item not in newitems:
newitems.append(item)
return newitems
return list(dict.fromkeys(items))
def _parse_sub(source, state, verbose, nested):
# parse an alternation: a|b|c
...
...
Misc/ACKS
View file @
9f55551f
...
...
@@ -1708,6 +1708,7 @@ Michael Urman
Hector Urtubia
Lukas Vacek
Ville Vainio
Yann Vaginay
Andi Vajda
Case Van Horsen
John Mark Vandenberg
...
...
Misc/NEWS.d/next/Library/2019-07-31-16-49-01.bpo-37723.zq6tw8.rst
0 → 100644
View file @
9f55551f
Fix performance regression on regular expression parsing with huge
character sets. Patch by Yann Vaginay.
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment