Re: Regex performance regression induced by match-all code

2021-05-03 Thread Joel Jacobson
On Mon, May 3, 2021, at 21:38, Tom Lane wrote: > "Joel Jacobson" mailto:joel%40compiler.org>> writes: > > On Sun, May 2, 2021, at 18:53, Tom Lane wrote: > >> fix-exponential-cost-of-checkmatchall-2.patch > > > Successfully tested. > > Again, thanks for checking! You're welcome, thanks for coding

Re: Regex performance regression induced by match-all code

2021-05-03 Thread Tom Lane
"Joel Jacobson" writes: > On Sun, May 2, 2021, at 18:53, Tom Lane wrote: >> fix-exponential-cost-of-checkmatchall-2.patch > Successfully tested. Again, thanks for checking! regards, tom lane

Re: Regex performance regression induced by match-all code

2021-05-03 Thread Joel Jacobson
On Sun, May 2, 2021, at 18:53, Tom Lane wrote: > fix-exponential-cost-of-checkmatchall-2.patch Successfully tested. SELECT is_match <> (subject ~ pattern), captured IS DISTINCT FROM regexp_match(subject, pattern, flags), COUNT(*) FROM performance_test GROUP BY 1,2 ORDER BY 1,2; ?column? | ?

Re: Regex performance regression induced by match-all code

2021-05-02 Thread Tom Lane
"Joel Jacobson" writes: > On Sat, May 1, 2021, at 21:46, Tom Lane wrote: >> I found a nasty performance problem in commit 824bf7190: given the >> right sort of regex, checkmatchall() takes an unreasonable amount >> of time. > Nice catch. > I've successfully tested the patch on the regex corpus:

Re: Regex performance regression induced by match-all code

2021-05-01 Thread Joel Jacobson
On Sat, May 1, 2021, at 21:46, Tom Lane wrote: > I found a nasty performance problem in commit 824bf7190: given the > right sort of regex, checkmatchall() takes an unreasonable amount > of time. Nice catch. > fix-exponential-cost-of-checkmatchall-1.patch I've successfully tested the patch on the

Regex performance regression induced by match-all code

2021-05-01 Thread Tom Lane
I found a nasty performance problem in commit 824bf7190: given the right sort of regex, checkmatchall() takes an unreasonable amount of time. For example, regression=# SELECT regexp_matches('', '(.|){20}',''); regexp_matches {""} (1 row) Time: 129.213 ms regression=# SELECT r