[issue34636] re module microoptimization: speed up bytes \w \s \d matching

2018-09-11 Thread Gregory P. Smith


Change by Gregory P. Smith :


--
resolution:  -> fixed
stage:  -> commit review
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue34636] re module microoptimization: speed up bytes \w \s \d matching

2018-09-11 Thread miss-islington


miss-islington  added the comment:


New changeset ec014a101a7f6243b95dfc08acfe1542b9fa5d39 by Miss Islington (bot) 
(Sergey Fedoseev) in branch 'master':
bpo-34636: Use fast path for more chars in SRE category macros. (GH-9170)
https://github.com/python/cpython/commit/ec014a101a7f6243b95dfc08acfe1542b9fa5d39


--
nosy: +miss-islington

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue34636] re module microoptimization: speed up bytes \w \s \d matching

2018-09-11 Thread Gregory P. Smith


Gregory P. Smith  added the comment:

Confirming the microoptimization here with a non-debug (opt) build:

~/oss/cpython$ sre-before/python -m timeit -s "import re; s = (b'~' * 100); 
f = re.compile(b'\s\w\d').search" "f(s)"
20 loops, best of 5: 11 msec per loop
~/oss/cpython$ sre-after/python -m timeit -s "import re; s = (b'~' * 100); 
f = re.compile(b'\s\w\d').search" "f(s)"
20 loops, best of 5: 10.1 msec per loop

Those results are consistent across reruns.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue34636] re module microoptimization: speed up bytes \w \s \d matching

2018-09-11 Thread Gregory P. Smith


New submission from Gregory P. Smith :

filing this issue to track https://github.com/python/cpython/pull/9170

--
assignee: gregory.p.smith
messages: 325073
nosy: gregory.p.smith
priority: normal
pull_requests: 8627
severity: normal
status: open
title: re module microoptimization: speed up bytes \w \s \d matching
type: performance
versions: Python 3.8

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com