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

From Ranier Vilela
Subject Re: [PATCH] Optimize json_lex_string by batching character copying
Date
Msg-id CAEudQApiA058=pe-=iBZSUKX2Qy_Vc96ehkWAkdUsPykTpq+vA@mail.gmail.com
Whole thread Raw
In response to Re: [PATCH] Optimize json_lex_string by batching character copying  (Ranier Vilela <ranier.vf@gmail.com>)
List pgsql-hackers
Em seg., 15 de ago. de 2022 às 15:34, Ranier Vilela <ranier.vf@gmail.com> escreveu:

Hi,

I ran this test.

DROP TABLE IF EXISTS long_json_as_text;
CREATE TABLE long_json_as_text AS
with long as (
select repeat(description, 11)
from pg_description
)
select (select json_agg(row_to_json(long))::text as t from long) from
generate_series(1, 100);
VACUUM FREEZE long_json_as_text;

select 1 from long_json_as_text where t::json is null;

head:
Time: 161,741ms

v5:
Time: 270,298 ms
Sorry too fast, 270,298ms with native memchr.

v5
Time: 208,689 ms

regards,
Ranier Vilela

pgsql-hackers by date:

Previous
From: Ranier Vilela
Date:
Subject: Re: [PATCH] Optimize json_lex_string by batching character copying
Next
From: Andres Freund
Date:
Subject: Re: Cleaning up historical portability baggage