Re: [PATCH] Optimize json_lex_string by batching character copying
Nathan Bossart <nathandbossart@gmail.com>
From: Nathan Bossart <nathandbossart@gmail.com>
To: John Naylor <john.naylor@enterprisedb.com>
Cc: Andres Freund <andres@anarazel.de>, Tom Lane <tgl@sss.pgh.pa.us>, Jelte Fennema <Jelte.Fennema@microsoft.com>, "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>, Merlin Moncure <mmoncure@gmail.com>, Andrew Dunstan <andrew.dunstan@2ndquadrant.com>, Stephen Frost <sfrost@snowman.net>
Date: 2022-08-31T04:17:12Z
Lists: pgsql-hackers
On Wed, Aug 31, 2022 at 10:50:39AM +0700, John Naylor wrote: > Here's the final piece. I debated how many tests to add and decided it > was probably enough to add one each for checking quotes and > backslashes in the fast path. There is one cosmetic change in the > code: Before, the vectorized less-equal check compared to 0x1F, but > the byte-wise path did so with < 32. I made them both "less-equal 31" > for consistency. I'll commit this by the end of the week unless anyone > has a better idea about testing. LGTM -- Nathan Bossart Amazon Web Services: https://aws.amazon.com
Commits
-
Speed up lexing of long JSON strings
- 0a8de93a48ce 16.0 landed
-
Add optimized functions for linear search within byte arrays
- e813e0e16852 16.0 landed
-
Build de-escaped JSON strings in larger chunks during lexing
- 3838fa269c15 16.0 landed
-
Simplify json lexing state
- 3de359f18f2b 16.0 landed