msg201177 - (view) |
Author: Serhiy Storchaka (serhiy.storchaka) *  |
Date: 2013-10-24 20:14 |
Proposed patch optimizes parsing of regular expressions. Total time of re unittests decreased by 10%. |
|
|
msg201183 - (view) |
Author: Antoine Pitrou (pitrou) *  |
Date: 2013-10-24 20:27 |
I don't think "+=" speeds up anything for ints, you might as well minimize code churn by avoiding such changes. |
|
|
msg201191 - (view) |
Author: Serhiy Storchaka (serhiy.storchaka) *  |
Date: 2013-10-24 21:30 |
Done. |
|
|
msg201192 - (view) |
Author: Antoine Pitrou (pitrou) *  |
Date: 2013-10-24 21:40 |
Do you have any benchmark figures (apart from the time of re unittests)? |
|
|
msg201227 - (view) |
Author: Serhiy Storchaka (serhiy.storchaka) *  |
Date: 2013-10-25 10:20 |
### 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 |
|
|
msg206557 - (view) |
Author: Serhiy Storchaka (serhiy.storchaka) *  |
Date: 2013-12-18 22:02 |
Could someone please make a review? |
|
|
msg227032 - (view) |
Author: Serhiy Storchaka (serhiy.storchaka) *  |
Date: 2014-09-18 09:11 |
Actually "if x:" is slightly faster than "if x is not None:" on current implementation. |
|
|
msg227041 - (view) |
Author: Antoine Pitrou (pitrou) *  |
Date: 2014-09-18 13:23 |
"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. |
|
|
msg227053 - (view) |
Author: Serhiy Storchaka (serhiy.storchaka) *  |
Date: 2014-09-18 16:54 |
Well, then please look at re_parse_2.patch (it is still applied cleanly). |
|
|
msg228605 - (view) |
Author: Serhiy Storchaka (serhiy.storchaka) *  |
Date: 2014-10-05 18:04 |
Here is a patch which addresses Yury's and Josh's comments. Also discarded few minor changes. |
|
|
msg228838 - (view) |
Author: Serhiy Storchaka (serhiy.storchaka) *  |
Date: 2014-10-09 08:23 |
Updated patch implements Antoine's suggestions. |
|
|
msg228964 - (view) |
Author: Roundup Robot (python-dev)  |
Date: 2014-10-10 08:16 |
New changeset 1adeac2a8714 by Serhiy Storchaka in branch 'default': Issue #19380: Optimized parsing of regular expressions. https://hg.python.org/cpython/rev/1adeac2a8714 |
|
|
msg228971 - (view) |
Author: Serhiy Storchaka (serhiy.storchaka) *  |
Date: 2014-10-10 08:46 |
Thank you for your reviews Yury, Josh, and Antoine. |
|
|