Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lDOQI-00076A-Nn for pgsql-hackers@arkaria.postgresql.org; Sat, 20 Feb 2021 09:19:35 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lDOQH-0005cV-Ki for pgsql-hackers@arkaria.postgresql.org; Sat, 20 Feb 2021 09:19:33 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lDOQG-0005cO-5X for pgsql-hackers@lists.postgresql.org; Sat, 20 Feb 2021 09:19:33 +0000 Received: from out5-smtp.messagingengine.com ([66.111.4.29]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lDOQC-00020p-9T for pgsql-hackers@lists.postgresql.org; Sat, 20 Feb 2021 09:19:31 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 8D9F35C00FB; Sat, 20 Feb 2021 04:19:25 -0500 (EST) Received: from imap2 ([10.202.2.52]) by compute5.internal (MEProxy); Sat, 20 Feb 2021 04:19:25 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=compiler.org; h= mime-version:message-id:in-reply-to:references:date:from:to:cc :subject:content-type; s=fm1; bh=dZ3HV4T1HCYcqOvWkwZptHgGnhm3r5R 8QI4caqai7Ic=; b=p5zJeaIcpBVX4PwE7KHMK90OuwVR2LKupQcqdVbSVMEVITo zEiNZvMn+u74X1swLE71yy/nyaktGFlE086VUVFUfnkMvqbZwAqq450W6v5ubaGn 2GcaNPykDtqZkLlvGdlJKKyXITDbu7PdVGnFrDnkI5FPc/OvK4bx9ejpbV5L1dGq mCdBMwK2RDSkP9S9T32QGX0M0KJDq9npf1jHaF36IP3k26lW+gWRMUSXKBAJnYXw jEK5Xr0K9I282U9v1DPfsjgpHWOeqcpKPNYdxgYhKD86kV/vzhT7OupT7umL9ikp G+Z+2WgLzTso+VqW2k3itAhFM9zwwIcjYIPxYog== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=dZ3HV4 T1HCYcqOvWkwZptHgGnhm3r5R8QI4caqai7Ic=; b=fHI4yxEyMBllpDdrAjGW5L j9m1EonASLE3+dClxzdBZppc5ZwRPmbdKupG7B9cVCP/dmCU/i6VGW0soMlH+/9y BnoKebrOWNSDlo6NTLYIDnQSGDYJnjYsyDRT0BLk7Qd2EQ3HFYA8I3FkaQWNOYIJ wSoUw+Sxnx45NXXDQthb2imiFcsqa6MVjj6TMxNEYwUoUFeqCBQntD/2oETvL0rZ 2kJzGTlkONQTn083tMQqQyVuE24PGo2K1YK6hk77k3pCGxPpLTbmc8MOg/FsdvMq XxmtvnlmE2RTNEOXOOPRSJtCy2YgiVLQydk9tZlRtERFTiTLvpCcrT6TyIgWjq/w == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrjeejgdduvdejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefofgggkfgjfhffhffvufgtsehmtd erreerredtnecuhfhrohhmpedflfhovghlucflrggtohgsshhonhdfuceojhhovghlsegt ohhmphhilhgvrhdrohhrgheqnecuggftrfgrthhtvghrnhephffgkeevieduudevvdette ehjeegvdduhfevleeileelfffhleevteehueehhedvnecuvehluhhsthgvrhfuihiivgep tdenucfrrghrrghmpehmrghilhhfrhhomhepjhhovghlsegtohhmphhilhgvrhdrohhrgh X-ME-Proxy: Received: by mailuser.nyi.internal (Postfix, from userid 501) id AB2E6A00060; Sat, 20 Feb 2021 04:19:24 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.5.0-alpha0-141-gf094924a34-fm-20210210.001-gf094924a Mime-Version: 1.0 Message-Id: <7c8faebf-a9c3-4144-88cd-7ff81a1e8763@www.fastmail.com> In-Reply-To: <3028106.1613748380@sss.pgh.pa.us> References: <1340281.1613018383@sss.pgh.pa.us> <85140bfb-516c-449b-8a03-7930abb42b88@www.fastmail.com> <1813969.1613250697@sss.pgh.pa.us> <913516b8-c3d7-4dea-bf60-d735cf4673f1@www.fastmail.com> <2155152.1613358697@sss.pgh.pa.us> <99f6cbe0-6e58-4e41-add0-977271a5cf84@www.fastmail.com> <2752386.1613595636@sss.pgh.pa.us> <5deabab3-a335-4b57-a046-8a9ad8f2f142@www.fastmail.com> <12e6381c-adc1-4711-a619-864fb8df969c@www.fastmail.com> <2840118.1613671847@sss.pgh.pa.us> <2845172.1613674385@sss.pgh.pa.us> <3028106.1613748380@sss.pgh.pa.us> Date: Sat, 20 Feb 2021 10:19:04 +0100 From: "Joel Jacobson" To: "Tom Lane" Cc: pgsql-hackers@lists.postgresql.org Subject: Re: Some regular-expression performance hacking Content-Type: multipart/mixed; boundary=07eac88cad9f4c73b804951e56943b9b List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --07eac88cad9f4c73b804951e56943b9b Content-Type: multipart/alternative; boundary=02175f4f65d34071869e5c0ec0b75073 --02175f4f65d34071869e5c0ec0b75073 Content-Type: text/plain On Fri, Feb 19, 2021, at 16:26, Tom Lane wrote: >"Joel Jacobson" writes: >> On Thu, Feb 18, 2021, at 19:53, Tom Lane wrote: >>> (Having said that, I can't help noticing that a very large fraction >>> of those usages look like, eg, "[\w\W]". It seems to me that that's >>> a very expensive and unwieldy way to spell ".". Am I missing >>> something about what that does in Javascript?) > >> I think this is a non-POSIX hack to match any character, including newlines, >> which are not included unless the "s" flag is set. > >> "foo\nbar".match(/([\w\W]+)/)[1]; >> "foo >> bar" > >Oooh, that's very interesting. I guess the advantage of that over using >the 's' flag is that you can have different behaviors at different places >in the same regex. I would guess the same thing. >I was just wondering about this last night in fact, while hacking on >the code to get it to accept \W etc in bracket expressions. I see that >right now, our code thinks that NLSTOP mode ('n' switch, the opposite >of 's') should cause \W \D \S to not match newline. That seems a little >weird, not least because \S should probably be different from the other >two, and it isn't. And now we see it'd mean that you couldn't use the 'n' >switch to duplicate Javascript's default behavior in this area. Should we >change it? (I wonder what Perl does.) > >regards, tom lane To allow comparing PostgreSQL vs Javascript vs Perl, I installed three helper-functions using plv8 and plperl, and also one convenience function for PostgreSQL to catch errors and return the error string instead: The string used in this test is "foo!\n!bar", which aims to detect differences in how new-lines and non alpha-number characters are handled. To allow PostgreSQL to be compared with Javascript and Perl, the "n" flag is used for PostgreSQL when no flags are used for Javascript/Perl, and no flag for PostgreSQL when the "s" flag is used for Javascript/Perl, for the results to be comparable. In Javascript, when a regex contains capture groups, the entire match is always returns as the first array element. To make it easier to visually compare the results, the first element is removed from Javascript, which works in this test since all regexes contain exactly one capture group. Here are the results: $ psql -e -f not_alnum.sql regex SELECT regexp_match_pg(E'foo!\n!bar', '(.+)', 'n'), (regexp_match_v8(E'foo!\n!bar', '(.+)', ''))[2:], regexp_match_pl(E'foo!\n!bar', '(.+)', '') ; regexp_match_pg | regexp_match_v8 | regexp_match_pl -----------------+-----------------+----------------- {foo!} | {foo!} | {foo!} (1 row) SELECT regexp_match_pg(E'foo!\n!bar', '(.+)', ''), (regexp_match_v8(E'foo!\n!bar', '(.+)', 's'))[2:], regexp_match_pl(E'foo!\n!bar', '(.+)', 's') ; regexp_match_pg | regexp_match_v8 | regexp_match_pl -----------------+-----------------+----------------- {"foo! +| {"foo! +| {"foo! + !bar"} | !bar"} | !bar"} (1 row) SELECT regexp_match_pg(E'foo!\n!bar', '([\w\W]+)', 'n'), (regexp_match_v8(E'foo!\n!bar', '([\w\W]+)', ''))[2:], regexp_match_pl(E'foo!\n!bar', '([\w\W]+)', '') ; regexp_match_pg | regexp_match_v8 | regexp_match_pl ------------------------------------------------------------+-----------------+----------------- {"invalid regular expression: invalid escape \\ sequence"} | {"foo! +| {"foo! + | !bar"} | !bar"} (1 row) SELECT regexp_match_pg(E'foo!\n!bar', '([\w\W]+)', ''), (regexp_match_v8(E'foo!\n!bar', '([\w\W]+)', 's'))[2:], regexp_match_pl(E'foo!\n!bar', '([\w\W]+)', 's') ; regexp_match_pg | regexp_match_v8 | regexp_match_pl ------------------------------------------------------------+-----------------+----------------- {"invalid regular expression: invalid escape \\ sequence"} | {"foo! +| {"foo! + | !bar"} | !bar"} (1 row) SELECT regexp_match_pg(E'foo!\n!bar', '([\w]+)', 'n'), (regexp_match_v8(E'foo!\n!bar', '([\w]+)', ''))[2:], regexp_match_pl(E'foo!\n!bar', '([\w]+)', '') ; regexp_match_pg | regexp_match_v8 | regexp_match_pl -----------------+-----------------+----------------- {foo} | {foo} | {foo} (1 row) SELECT regexp_match_pg(E'foo!\n!bar', '([\w]+)', ''), (regexp_match_v8(E'foo!\n!bar', '([\w]+)', 's'))[2:], regexp_match_pl(E'foo!\n!bar', '([\w]+)', 's') ; regexp_match_pg | regexp_match_v8 | regexp_match_pl -----------------+-----------------+----------------- {foo} | {foo} | {foo} (1 row) SELECT regexp_match_pg(E'foo!\n!bar', '([\W]+)', 'n'), (regexp_match_v8(E'foo!\n!bar', '([\W]+)', ''))[2:], regexp_match_pl(E'foo!\n!bar', '([\W]+)', '') ; regexp_match_pg | regexp_match_v8 | regexp_match_pl ------------------------------------------------------------+-----------------+----------------- {"invalid regular expression: invalid escape \\ sequence"} | {"! +| {"! + | !"} | !"} (1 row) SELECT regexp_match_pg(E'foo!\n!bar', '([\W]+)', ''), (regexp_match_v8(E'foo!\n!bar', '([\W]+)', 's'))[2:], regexp_match_pl(E'foo!\n!bar', '([\W]+)', 's') ; regexp_match_pg | regexp_match_v8 | regexp_match_pl ------------------------------------------------------------+-----------------+----------------- {"invalid regular expression: invalid escape \\ sequence"} | {"! +| {"! + | !"} | !"} (1 row) SELECT regexp_match_pg(E'foo!\n!bar', '(\w+)', 'n'), (regexp_match_v8(E'foo!\n!bar', '(\w+)', ''))[2:], regexp_match_pl(E'foo!\n!bar', '(\w+)', '') ; regexp_match_pg | regexp_match_v8 | regexp_match_pl -----------------+-----------------+----------------- {foo} | {foo} | {foo} (1 row) SELECT regexp_match_pg(E'foo!\n!bar', '(\w+)', ''), (regexp_match_v8(E'foo!\n!bar', '(\w+)', 's'))[2:], regexp_match_pl(E'foo!\n!bar', '(\w+)', 's') ; regexp_match_pg | regexp_match_v8 | regexp_match_pl -----------------+-----------------+----------------- {foo} | {foo} | {foo} (1 row) SELECT regexp_match_pg(E'foo!\n!bar', '(\W+)', 'n'), (regexp_match_v8(E'foo!\n!bar', '(\W+)', ''))[2:], regexp_match_pl(E'foo!\n!bar', '(\W+)', '') ; regexp_match_pg | regexp_match_v8 | regexp_match_pl -----------------+-----------------+----------------- {!} | {"! +| {"! + | !"} | !"} (1 row) SELECT regexp_match_pg(E'foo!\n!bar', '(\W+)', ''), (regexp_match_v8(E'foo!\n!bar', '(\W+)', 's'))[2:], regexp_match_pl(E'foo!\n!bar', '(\W+)', 's') ; regexp_match_pg | regexp_match_v8 | regexp_match_pl -----------------+-----------------+----------------- {"! +| {"! +| {"! + !"} | !"} | !"} (1 row) /Joel --02175f4f65d34071869e5c0ec0b75073 Content-Type: text/html Content-Transfer-Encoding: quoted-printable
On Fri, Feb 19,= 2021, at 16:26, Tom Lane wrote:
>"Joel Jacobson" <j= oel@compiler.org> writes:
>> On Thu, Feb 18, 2021= , at 19:53, Tom Lane wrote:
>>> (Having said that= , I can't help noticing that a very large fraction
>>= ;> of those usages look like, eg, "[\w\W]".  It seems to me that= that's
>>> a very expensive and unwieldy way to = spell ".".  Am I missing
>>> something about= what that does in Javascript?)
>
>>= ; I think this is a non-POSIX hack to match any character, including new= lines,
>> which are not included unless the "s" flag= is set.
>
>> "foo\nbar".match(/([\= w\W]+)/)[1];
>> "foo
>> bar"
=
>
>Oooh, that's very interesting. &n= bsp; I guess the advantage of that over using
>the 's' = flag is that you can have different behaviors at different places
>in the same regex.

I would gues= s the same thing.

>I was just wondering = about this last night in fact, while hacking on
>the co= de to get it to accept \W etc in bracket expressions.  I see that
>right now, our code thinks that NLSTOP mode ('n' switch= , the opposite
>of 's') should cause \W \D \S to not ma= tch newline.  That seems a little
>weird, not leas= t because \S should probably be different from the other
&= gt;two, and it isn't.  And now we see it'd mean that you couldn't u= se the 'n'
>switch to duplicate Javascript's default be= havior in this area.  Should we
>change it?  = (I wonder what Perl does.)
>
>regards,= tom lane

To allow comparing PostgreSQL vs = Javascript vs Perl,
I installed three helper-functions usi= ng plv8 and plperl,
and also one convenience function for = PostgreSQL
to catch errors and return the error string ins= tead:

The string used in this test is "foo!= \n!bar",
which aims to detect differences in how new-lines=
and non alpha-number characters are handled.

To allow PostgreSQL to be compared with Javascript and = Perl,
the "n" flag is used for PostgreSQL when no flags ar= e used for Javascript/Perl,
and no flag for PostgreSQL whe= n the "s" flag is used for Javascript/Perl,
for the result= s to be comparable.

In Javascript, when a r= egex contains capture groups, the entire match
is always r= eturns as the first array element.
To make it easier to vi= sually compare the results,
the first element is removed f= rom Javascript,
which works in this test since all regexes= contain
exactly one capture group.

Here are the results:

$ psql -e -f not_alnum.sql r= egex

SELECT
  regexp_match_pg(E'foo!\n!bar', '(.+)', 'n'),
 = (regexp_match_v8(E'foo!\n!bar', '(.+)', ''))[2:],
=   regexp_match_pl(E'= foo!\n!bar', '(.+)', '')
;
regexp_match_pg | regexp_match_v8 | regexp_match_pl
------= -----------+-----------------+-----------------
{foo!}   &nbs= p;      | {foo!}     &= nbsp;    | {foo!}
(1 row)

SELECT
  regexp_match_p= g(E'foo!\n!bar', '(.+)', ''),
  (regexp_match_v8(E'foo!\n!bar', '(.+)',= 's'))[2:],
  regexp_match_pl(E'foo!\n!bar', '(.+)', 's')
;
regexp_match_pg | r= egexp_match_v8 | regexp_match_pl
-----------------+-----------------+-------= ----------
{"foo!         +| {"foo!&= nbsp;        +| {"foo!  &nb= sp;      +
!bar"}     &nbs= p;    | !bar"}       &= nbsp;  | !bar"}
(1 row)

SELECT
  regexp_match_pg(E'foo!\n!b= ar', '([\w\W]+)', 'n'),
  (regexp_match_v8(E'foo!\n!bar', '([\w\W]+)', ''= ))[2:],
=
  regexp_match_pl(E'foo!\n!bar', '([\w\W]+)', '')
;
   &= nbsp;           &= nbsp;      regexp_match_pg   &nb= sp;           &nb= sp;       | regexp_match_v8 | regexp_match= _pl
= ------------------------------------------------------------+-----------= ------+-----------------
{"invalid regular expression: invalid escape \\ seq= uence"} | {"foo!         +| {"fo= o!         +
    =             =             =             =             =         | !bar"}   &nb= sp;      | !bar"}
(1 row)

= SELECT<= span class=3D"size" style=3D"font-size:10px;">
  rege= xp_match_pg(E'foo!\n!bar', '([\w\W]+)', ''),
  (regexp_match_v8(E'foo!\= n!bar', '([\w\W]+)', 's'))[2:],
  regexp_match_pl(E'foo!\n!bar', '([\w\= W]+)', 's')
;
           =            regexp_matc= h_pg           &n= bsp;           | regex= p_match_v8 | regexp_match_pl
-----------------------------------------------= -------------+-----------------+-----------------
{"invalid regular expression= : invalid escape \\ sequence"} | {"foo!     &nb= sp;   +| {"foo!        = ; +
=             =             =             =             =             | !ba= r"}          | !bar"}
=
(1 row)

<= /span>
SELECT
  regexp_match_pg(E'foo!\n!bar', '([\w]+)', 'n'),
  (= regexp_match_v8(E'foo!\n!bar', '([\w]+)', ''))[2:],
  regexp_match_pl(E= 'foo!\n!bar', '([\w]+)', '')
;
regexp_match_pg | regexp_match_v8 | regexp_match_= pl
-= ----------------+-----------------+-----------------
{foo}   &= nbsp;       | {foo}    = ;       | {foo}
(1 row)

SELECT=
<= div>  reg= exp_match_pg(E'foo!\n!bar', '([\w]+)', ''),
  (regexp_match_v8(E'foo!\n= !bar', '([\w]+)', 's'))[2:],
  regexp_match_pl(E'foo!\n!bar', '([\w]+)'= , 's')
<= /span>
;
regexp_match_pg | regexp_match_v8 | regexp_match_pl
-----------------+------= -----------+-----------------
{foo}       = ;    | {foo}       &nb= sp;   | {foo}
(1 row)

SELECT
  regexp_match_pg(E'foo!\n!= bar', '([\W]+)', 'n'),
  (regexp_match_v8(E'foo!\n!bar', '([\W]+)', ''))= [2:],
  regexp_match_pl(E'foo!\n!bar', '([\W]+)', '')
;
    =             =       regexp_match_pg    &n= bsp;           &n= bsp;      | regexp_match_v8 | regexp_match_pl
-----= -------------------------------------------------------+----------------= -+-----------------
{"invalid regular expression: invalid escape \\ sequence= "} | {"!          &nbs= p; +| {"!          &nb= sp; +
           &nbs= p;           &nbs= p;           &nbs= p;           &nbs= p;            | != "}           &nbs= p; | !"}
(1 row)

SELECT
  regexp_match_pg(E'foo!\n!bar', '([\W]+= )', ''),
  (regexp_match_v8(E'foo!\n!bar', '([\W]+)', 's'))[2:],=
<= div>  reg= exp_match_pl(E'foo!\n!bar', '([\W]+)', 's')
;
     &nbs= p;           &nbs= p;    regexp_match_pg      =             =      | regexp_match_v8 | regexp_match_pl
<= span class=3D"font" style=3D"font-family:menlo, consolas, monospace, san= s-serif;">---------------= ---------------------------------------------+-----------------+--------= ---------
{"invalid regular expression: invalid escape \\ sequence"} | {"!&n= bsp;           +| {"!&= nbsp;           +
 &n= bsp;           &n= bsp;           &n= bsp;           &n= bsp;           &n= bsp;          | !"} &n= bsp;           | !"}
(1 ro= w)
<= br>
SELECT
  regexp_match_pg(E'foo!\n!bar', '(\w+)', 'n'),
 = (regexp_match_v8(E'foo!\n!bar', '(\w+)', ''))[2:],
  regexp_match_pl(E= 'foo!\n!bar', '(\w+)', '')
;
regexp_match_pg | regexp_match_v8 | regexp_match_pl=
=
---= --------------+-----------------+-----------------
= {foo}   &n= bsp;       | {foo}    =        | {foo}
(1 row)

SELECT=
<= div>  reg= exp_match_pg(E'foo!\n!bar', '(\w+)', ''),
  (regexp_match_v8(E'foo!\n!b= ar', '(\w+)', 's'))[2:],
  regexp_match_pl(E'foo!\n!bar', '(\w+)', 's')=
=
;
regex= p_match_pg | regexp_match_v8 | regexp_match_pl
-----------------+-----------= ------+-----------------
{foo}       &nbs= p;   | {foo}        &n= bsp;  | {foo}=
(1 row)

SELECT
  regexp_match_pg(E'foo!\n!bar'= , '(\W+)', 'n'),
  (regexp_match_v8(E'foo!\n!bar', '(\W+)', ''))[2:],
 = ; regexp_match_pl(E'foo!\n!bar', '(\W+)', '')
;
regexp_match_pg | regexp_match_v= 8 | regexp_match_pl
-----------------+-----------------+-----------------
{!}&nb= sp;            | = {"!            +|= {"!            +=
=
&nb= sp;           &nb= sp;    | !"}       &nb= sp;     | !"}
(1 row)

SELECT
  regexp_match_p= g(E'foo!\n!bar', '(\W+)', ''),
  (regexp_match_v8(E'foo!\n!bar', '(\W+)= ', 's'))[2:],
<= /span>
  regexp_match_pl(E'foo!\n!bar', '(\W+)', 's')
= ;
regexp_match_pg = | regexp_match_v8 | regexp_match_pl
-----------------+-----------------+----= -------------
<= /span>
{"!          = ;  +| {"!         &nbs= p;  +| {"!         &nb= sp;  +
!"}          &= nbsp;  | !"}         &= nbsp;   | !"}
(1 row)

/Joel
--02175f4f65d34071869e5c0ec0b75073-- --07eac88cad9f4c73b804951e56943b9b Content-Disposition: attachment;filename="not_alnum.sql" Content-Type: application/octet-stream; name="not_alnum.sql" Content-Transfer-Encoding: BASE64 Q1JFQVRFIEVYVEVOU0lPTiBJRiBOT1QgRVhJU1RTIHBsdjg7CkNSRUFURSBFWFRFTlNJT04g SUYgTk9UIEVYSVNUUyBwbHBlcmw7CgpDUkVBVEUgT1IgUkVQTEFDRSBGVU5DVElPTiByZWdl eHBfbWF0Y2hfcGcoc3ViamVjdCB0ZXh0LCBwYXR0ZXJuIHRleHQsIGZsYWdzIHRleHQpClJF VFVSTlMgdGV4dFtdCkxBTkdVQUdFIHB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