[Python-Dev] re performance

Wang, Peter Xihong peter.xihong.wang at intel.com
Wed Feb 1 17:59:14 EST 2017


+1

We'd like to get more details on how to try this "new mode", and do a full/comprehensive comparison between the "re" vs "regex".

Peter


 
-----Original Message-----
From: Victor Stinner [mailto:victor.stinner at gmail.com] 
Sent: Wednesday, February 01, 2017 12:58 PM
To: Lukasz Langa <lukasz at langa.pl>
Cc: Wang, Peter Xihong <peter.xihong.wang at intel.com>; python-dev at python.org
Subject: Re: [Python-Dev] re performance

2017-02-01 20:42 GMT+01:00 Lukasz Langa <lukasz at langa.pl>:
> However, this benchmark is incomplete in the sense that it only checks 
> the compatibility mode of `regex`, whereas it's the new mode that 
> lends the biggest performance gains. So, providing checks for the 
> other engine would show us the full picture.

Would you mind to write a pull request for performance to add a command line option to test "re" (stdlib) or "regex" (PyPI, in the new mode)? Or maybe even regex and regex_compatibility_mode :-)

Source:
https://github.com/python/performance/blob/master/performance/benchmarks/bm_regex_v8.py#L1789

Example of benchmark with cmdline options:
https://github.com/python/performance/blob/master/performance/benchmarks/bm_raytrace.py#L385

Victor


More information about the Python-Dev mailing list