Re: [PATCH] Optimize json_lex_string by batching character copying - Mailing list pgsql-hackers

From Andres Freund
Subject Re: [PATCH] Optimize json_lex_string by batching character copying
Date
Msg-id 20220711160728.tljbnowfgxefdbli@awork3.anarazel.de
Whole thread Raw
In response to Re: [PATCH] Optimize json_lex_string by batching character copying  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: [PATCH] Optimize json_lex_string by batching character copying
List pgsql-hackers
Hi,

On 2022-07-11 11:53:26 -0400, Tom Lane wrote:
> Andres Freund <andres@anarazel.de> writes:
> > I wonder if we can't abstract this at least a bit better. If we go that route
> > a bit further, then add another arch, this code will be pretty much
> > unreadable.
>
> IMO, it's pretty unreadable *now*, for lack of comments about what it's
> doing and why.

Yea, that could at least be addressed by adding comments. But even with a
bunch of comments, it'd still be pretty hard to read once the events above
have happened (and they seem kind of inevitable).

I wonder if we can add a somewhat more general function for scanning until
some characters are found using SIMD? There's plenty other places that could
be useful.

Greetings,

Andres Freund



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: automatically generating node support functions
Next
From: Gaddam Sai Ram
Date:
Subject: Re: make install-world fails sometimes in Mac M1