[Python-Dev] Re: Performance benchmarks for 3.9

2020-10-14 Thread Terry Reedy
On 10/14/2020 9:16 AM, Pablo Galindo Salgado wrote: You can check these benchmarks I am talking about by: * Go here: https://speed.python.org/comparison/ * In the left bar, select "lto-pgo latest in branch '3.9'" and "lto-pgo latest in branch '3.8'" At the moment, there are only results for

Re: [Python-Dev] re performance

2017-02-01 Thread Franklin? Lee
On Thu, Jan 26, 2017 at 4:13 PM, Sven R. Kunze wrote: > Hi folks, > > I recently refreshed regular expressions theoretical basics *indulging in > reminiscences* So, I read https://swtch.com/~rsc/regexp/regexp1.html > > However, reaching the chart in the lower third of the

Re: [Python-Dev] re performance

2017-02-01 Thread Wang, Peter Xihong
12:58 PM To: Lukasz Langa <luk...@langa.pl> Cc: Wang, Peter Xihong <peter.xihong.w...@intel.com>; python-dev@python.org Subject: Re: [Python-Dev] re performance 2017-02-01 20:42 GMT+01:00 Lukasz Langa <luk...@langa.pl>: > However, this benchmark is incomplete in the sense that

Re: [Python-Dev] re performance

2017-02-01 Thread Victor Stinner
2017-02-01 20:42 GMT+01:00 Lukasz Langa : > 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

Re: [Python-Dev] re performance

2017-02-01 Thread Serhiy Storchaka
On 31.01.17 21:40, Wang, Peter Xihong wrote: Regarding to the performance difference between "re" and "regex" and packaging related options, we did a performance comparison using Python 3.6.0 to run some micro-benchmarks in the Python Benchmark Suite (https://github.com/python/performance):

Re: [Python-Dev] re performance

2017-02-01 Thread Lukasz Langa
> On Jan 31, 2017, at 11:40 AM, Wang, Peter Xihong > wrote: > > Regarding to the performance difference between "re" and "regex" and > packaging related options, we did a performance comparison using Python 3.6.0 > to run some micro-benchmarks in the Python

Re: [Python-Dev] re performance

2017-01-31 Thread Wang, Peter Xihong
talling stuff. Cheers, Peter   -Original Message- From: Python-Dev [mailto:python-dev-bounces+peter.xihong.wang=intel@python.org] On Behalf Of Nick Coghlan Sent: Tuesday, January 31, 2017 1:54 AM To: Barry Warsaw <ba...@python.org> Cc: python-dev@python.org Subject: Re: [Pyth

Re: [Python-Dev] re performance

2017-01-31 Thread Nick Coghlan
On 30 January 2017 at 15:26, Barry Warsaw wrote: > On Jan 30, 2017, at 12:38 PM, Nick Coghlan wrote: > >>I think there are 3 main candidates that could fit that bill: >> >>- requests >>- setuptools >>- regex > > Actually, I think pkg_resources would make an excellent candidate.

Re: [Python-Dev] re performance

2017-01-30 Thread Lukasz Langa
> On Jan 30, 2017, at 6:26 AM, Barry Warsaw wrote: > > Actually, I think pkg_resources would make an excellent candidate. The > setuptools crew is working on a branch that would allow for setuptools and > pkg_resources to be split, which would be great for other reasons.

Re: [Python-Dev] re performance

2017-01-30 Thread Barry Warsaw
On Jan 30, 2017, at 12:38 PM, Nick Coghlan wrote: >I think there are 3 main candidates that could fit that bill: > >- requests >- setuptools >- regex Actually, I think pkg_resources would make an excellent candidate. The setuptools crew is working on a branch that would allow for setuptools and

Re: [Python-Dev] re performance

2017-01-30 Thread Berker Peksağ
On Mon, Jan 30, 2017 at 2:56 PM, Antoine Pitrou wrote: > On Sun, 29 Jan 2017 20:30:38 + > Steve Holden wrote: >> Why not declare re deprecated and remove it in Python 4? > > Why deprecate and remove a library that's perfectly usable and >

Re: [Python-Dev] re performance

2017-01-30 Thread Antoine Pitrou
On Sun, 29 Jan 2017 20:30:38 + Steve Holden wrote: > Why not declare re deprecated and remove it in Python 4? Why deprecate and remove a library that's perfectly usable and satisfactory for the vast majority of regular expression usage? It's not like regex presents a

Re: [Python-Dev] re performance

2017-01-30 Thread Nick Coghlan
On 28 January 2017 at 18:07, Barry Warsaw wrote: > On Jan 28, 2017, at 03:43 PM, Nick Coghlan wrote: > >>I still think it could be a good candidate for a first "bundled" >>module, where we don't migrate it fully into the CPython development >>process, but *do* officially bless

Re: [Python-Dev] re performance

2017-01-29 Thread Greg Ewing
Armin Rigo wrote: The theoretical kind of regexp is about giving a "yes/no" answer, whereas the concrete "re" or "regexp" modules gives a match object, which lets you ask for the subgroups' location, for example. Another issue is that the theoretical engine has no notion of greedy/non-greedy

Re: [Python-Dev] re performance

2017-01-29 Thread Serhiy Storchaka
On 29.01.17 12:18, Jakub Wilk wrote: * Armin Rigo , 2017-01-28, 12:44: The theoretical kind of regexp is about giving a "yes/no" answer, whereas the concrete "re" or "regexp" modules gives a match object, which lets you ask for the subgroups' location, for example. Strange at it may seem, I am

Re: [Python-Dev] re performance

2017-01-29 Thread Serhiy Storchaka
On 29.01.17 22:30, Steve Holden wrote: Why not declare re deprecated and remove it in Python 4? I am pretty sure everyone wants to keep re in all 3.x releases, but that support need not extend beyond. So Py4 would have no battery for re, but it would (should!) be common knowledge that regex was

Re: [Python-Dev] re performance

2017-01-29 Thread Paul Moore
On 29 January 2017 at 20:30, Steve Holden wrote: > Why not declare re deprecated and remove it in Python 4? I am pretty sure > everyone wants to keep re in all 3.x releases, but that support need not > extend beyond. So Py4 would have no battery for re, but it would (should!)

Re: [Python-Dev] re performance

2017-01-29 Thread Steve Holden
Why not declare re deprecated and remove it in Python 4? I am pretty sure everyone wants to keep re in all 3.x releases, but that support need not extend beyond. So Py4 would have no battery for re, but it would (should!) be common knowledge that regex was the go-to module for general-purpose

Re: [Python-Dev] re performance

2017-01-29 Thread Antoine Pitrou
On Sat, 28 Jan 2017 12:07:05 -0500 Barry Warsaw wrote: > On Jan 28, 2017, at 03:43 PM, Nick Coghlan wrote: > > >I still think it could be a good candidate for a first "bundled" > >module, where we don't migrate it fully into the CPython development > >process, but *do*

Re: [Python-Dev] re performance

2017-01-29 Thread Jakub Wilk
* Armin Rigo , 2017-01-28, 12:44: The theoretical kind of regexp is about giving a "yes/no" answer, whereas the concrete "re" or "regexp" modules gives a match object, which lets you ask for the subgroups' location, for example. Strange at it may seem, I am not aware of a way to do that using

Re: [Python-Dev] re performance

2017-01-28 Thread Serhiy Storchaka
On 28.01.17 20:04, Brett Cannon wrote: Maybe regex should get a mention in the docs like requests does under urllib.request? https://bugs.python.org/issue22594 ___ Python-Dev mailing list Python-Dev@python.org

Re: [Python-Dev] re performance

2017-01-28 Thread Barry Warsaw
On Jan 28, 2017, at 03:43 PM, Nick Coghlan wrote: >I still think it could be a good candidate for a first "bundled" >module, where we don't migrate it fully into the CPython development >process, but *do* officially bless it and provide it by default in the >form of a bundled wheel file (similar

Re: [Python-Dev] re performance

2017-01-28 Thread Terry Reedy
On 1/28/2017 9:43 AM, Nick Coghlan wrote: On 27 January 2017 at 22:24, MRAB wrote: On 2017-01-27 17:03, Łukasz Langa wrote: What’s the status of regex inclusion in the stdlib? I'm not bothered about it. It's quite a bit bigger than the re module, and, anyway,

Re: [Python-Dev] re performance

2017-01-28 Thread Nick Coghlan
On 27 January 2017 at 22:24, MRAB wrote: > On 2017-01-27 17:03, Łukasz Langa wrote: >> >> >>> On Jan 26, 2017, at 5:16 PM, MRAB >> > wrote: >> >> So, it seems as if regex already uses a better

Re: [Python-Dev] re performance

2017-01-28 Thread Armin Rigo
Hi Sven, On 26 January 2017 at 22:13, Sven R. Kunze wrote: > I recently refreshed regular expressions theoretical basics *indulging in > reminiscences* So, I read https://swtch.com/~rsc/regexp/regexp1.html Theoretical regular expressions and what Python/Perl/etc. call regular

Re: [Python-Dev] re performance

2017-01-27 Thread MRAB
On 2017-01-27 22:15, Michael Felt wrote: On 27/01/2017 22:24, MRAB wrote: > I'm not bothered about it. It's quite a bit bigger than the re module, > and, anyway, keeping it as a third-party module gives me more freedom > to make updates, which are available for a range of Python versions. I

Re: [Python-Dev] re performance

2017-01-27 Thread Michael Felt
On 27/01/2017 22:24, MRAB wrote: I'm not bothered about it. It's quite a bit bigger than the re module, and, anyway, keeping it as a third-party module gives me more freedom to make updates, which are available for a range of Python versions. I tried packaging it (pip build) and ran into a

Re: [Python-Dev] re performance

2017-01-27 Thread MRAB
On 2017-01-27 17:03, Łukasz Langa wrote: On Jan 26, 2017, at 5:16 PM, MRAB > wrote: So, it seems as if regex already uses a better algorithm although I couldn't find any reference to any regex theoretical framework like dfa,

Re: [Python-Dev] re performance

2017-01-27 Thread Mark Lawrence via Python-Dev
On 27/01/2017 17:03, Łukasz Langa wrote: On Jan 26, 2017, at 5:16 PM, MRAB > wrote: So, it seems as if regex already uses a better algorithm although I couldn't find any reference to any regex theoretical framework like dfa,

Re: [Python-Dev] re performance

2017-01-27 Thread Łukasz Langa
> On Jan 26, 2017, at 5:16 PM, MRAB wrote: >> So, it seems as if regex already uses a better algorithm although I >> couldn't find any reference to any regex theoretical framework like dfa, >> nfa, thompson multiple-state simulation or something. >> > It still uses

Re: [Python-Dev] re performance

2017-01-26 Thread MRAB
On 2017-01-26 21:46, Sven R. Kunze wrote: On 26.01.2017 22:33, Vlastimil Brom wrote: Hi, I can't speak about the details of mrab's implementation, but using regex, I get the resulting match instantly: [...] Nice! I focused on the stdlib re module as this is mainly used by other frameworks

Re: [Python-Dev] re performance

2017-01-26 Thread MRAB
On 2017-01-26 21:13, Sven R. Kunze wrote: Hi folks, I recently refreshed regular expressions theoretical basics *indulging in reminiscences* So, I read https://swtch.com/~rsc/regexp/regexp1.html However, reaching the chart in the lower third of the article, I saw Python 2.4 measured against a

Re: [Python-Dev] re performance

2017-01-26 Thread Sven R. Kunze
On 26.01.2017 22:33, Vlastimil Brom wrote: Hi, I can't speak about the details of mrab's implementation, but using regex, I get the resulting match instantly: [...] Nice! I focused on the stdlib re module as this is mainly used by other frameworks (like Django). (I personally prefer to use

Re: [Python-Dev] re performance

2017-01-26 Thread Vlastimil Brom
2017-01-26 22:13 GMT+01:00 Sven R. Kunze : > Hi folks, > > I recently refreshed regular expressions theoretical basics *indulging in > reminiscences* So, I read https://swtch.com/~rsc/regexp/regexp1.html > > However, reaching the chart in the lower third of the article, I saw

[Python-Dev] re performance

2017-01-26 Thread Sven R. Kunze
Hi folks, I recently refreshed regular expressions theoretical basics *indulging in reminiscences* So, I read https://swtch.com/~rsc/regexp/regexp1.html However, reaching the chart in the lower third of the article, I saw Python 2.4 measured against a naive Thompson matching implementation.