Roundup Robot added the comment:
New changeset 1adeac2a8714 by Serhiy Storchaka in branch 'default':
Issue #19380: Optimized parsing of regular expressions.
https://hg.python.org/cpython/rev/1adeac2a8714
--
nosy: +python-dev
___
Python tracker
Serhiy Storchaka added the comment:
Thank you for your reviews Yury, Josh, and Antoine.
--
resolution: - fixed
stage: patch review - resolved
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19380
Serhiy Storchaka added the comment:
Updated patch implements Antoine's suggestions.
--
Added file: http://bugs.python.org/file36843/re_parse_5.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19380
Serhiy Storchaka added the comment:
Here is a patch which addresses Yury's and Josh's comments. Also discarded few
minor changes.
--
Added file: http://bugs.python.org/file36818/re_parse_4.patch
___
Python tracker rep...@bugs.python.org
Serhiy Storchaka added the comment:
Actually if x: is slightly faster than if x is not None: on current
implementation.
--
Added file: http://bugs.python.org/file36649/re_parse_3.patch
___
Python tracker rep...@bugs.python.org
Antoine Pitrou added the comment:
is not None is more readable, though. When using plain boolean testing, it's
never obvious whether you can have a zero-length string, a null number, etc.
--
___
Python tracker rep...@bugs.python.org
Serhiy Storchaka added the comment:
Well, then please look at re_parse_2.patch (it is still applied cleanly).
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19380
___
Changes by Josh Rosenberg shadowranger+pyt...@gmail.com:
--
nosy: +josh.rosenberg
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19380
___
___
Changes by Serhiy Storchaka storch...@gmail.com:
--
keywords: +needs review
versions: +Python 3.5 -Python 3.4
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19380
___
Changes by STINNER Victor victor.stin...@gmail.com:
--
nosy: +haypo
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19380
___
___
Python-bugs-list
Serhiy Storchaka added the comment:
Could someone please make a review?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19380
___
___
Serhiy Storchaka added the comment:
### regex_compile ###
Min: 2.897919 - 2.577488: 1.12x faster
Avg: 3.066306 - 2.681966: 1.14x faster
Significant (t=26.77)
Stddev: 0.08789 - 0.05085: 1.7283x smaller
--
___
Python tracker rep...@bugs.python.org
New submission from Serhiy Storchaka:
Proposed patch optimizes parsing of regular expressions. Total time of re
unittests decreased by 10%.
--
assignee: serhiy.storchaka
components: Library (Lib), Regular Expressions
files: re_parse.patch
keywords: patch
messages: 201177
nosy:
Antoine Pitrou added the comment:
I don't think += speeds up anything for ints, you might as well minimize code
churn by avoiding such changes.
--
nosy: +pitrou
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19380
Serhiy Storchaka added the comment:
Done.
--
Added file: http://bugs.python.org/file32343/re_parse_2.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19380
___
Antoine Pitrou added the comment:
Do you have any benchmark figures (apart from the time of re unittests)?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue19380
___
16 matches
Mail list logo