Re: Some regular-expression performance hacking

From: "Joel Jacobson" <joel(at)compiler(dot)org>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Chapman Flack" <chap(at)anastigmatix(dot)net>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Some regular-expression performance hacking
Date: 2021-03-06 05:03:30
Message-ID: 90ab371e-0977-481b-aa46-91b267f46edd@www.fastmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Feb 26, 2021, at 19:55, Tom Lane wrote:
> "Joel Jacobson" <joel(at)compiler(dot)org> writes:
> > On Fri, Feb 26, 2021, at 01:16, Tom Lane wrote:
> >> 0007-smarter-regex-allocation-2.patch
>
> > I've successfully tested this patch.
>
> Cool, thanks for testing!

I thought it would be interesting to see if any differences
in *where* matches occur not only *what* matches.

I've compared the output from regexp_positions()
between REL_13_STABLE and HEAD.

I'm happy to report no differences were found,
except some new expected

invalid regular expression: invalid character range

errors due to the fixes.

This time I also ran into the

(["'`])(?:\\\1|.)*?\1

pattern due to using the flags,
which caused a timeout on REL_13_STABLE,
but the same pattern is fast on HEAD.

All good.

/Joel

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrey Borodin 2021-03-06 07:29:14 Re: Different compression methods for FPI
Previous Message Zhihong Yu 2021-03-06 04:53:09 Re: Add client connection check during the execution of the query