Re: test_json_parser/002_inline is kind of slow - Mailing list pgsql-hackers

From Tom Lane
Subject Re: test_json_parser/002_inline is kind of slow
Date
Msg-id 172894.1758991429@sss.pgh.pa.us
Whole thread Raw
In response to Re: test_json_parser/002_inline is kind of slow  (Andrew Dunstan <andrew@dunslane.net>)
List pgsql-hackers
Andrew Dunstan <andrew@dunslane.net> writes:
> On 2025-09-26 Fr 8:06 PM, Jacob Champion wrote:
>> Unfortunately it only gives about a 4x speedup on my machine, and I
>> was hoping for much more. (We should really expect this entire thing
>> to run in a fraction of a second.)
>> 
>> Let me know if you think the tradeoff is worth it for now; I can
>> polish it up if so.

> On my (Linux) test it went from 3.75s to 0.78s, nearly 80% reduction. I 
> think the reduction on Windows is likely to be more. So I think this is 
> worth doing.

I tried it on my Mac M4 laptop, and saw the 002 test dropping from
3592 ms to 540 ms, about an 85% savings.  So I agree this is worth
doing.  It's still unclear why Robert is seeing times so much worse
than mine, though.

I didn't read the patch too carefully, but the changes in the
002_inline.pl script itself seem reasonable enough.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [PATCH] GROUP BY ALL
Next
From: Florents Tselai
Date:
Subject: Add jsonb_translate(jsonb, from, to)