Re: micro-optimizing json.c

From: Nathan Bossart <nathandbossart(at)gmail(dot)com>
To: John Naylor <johncnaylorls(at)gmail(dot)com>
Cc: David Rowley <dgrowleyml(at)gmail(dot)com>, Joe Conway <mail(at)joeconway(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Andrew Dunstan <andrew(at)dunslane(dot)net>, Davin Shearer <davin(at)apache(dot)org>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: micro-optimizing json.c
Date: 2023-12-08 19:45:25
Message-ID: 20231208194525.GA4028948@nathanxps13
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Dec 08, 2023 at 11:51:15AM +0700, John Naylor wrote:
> This is less verbose and still compiles with constants:
>
> use_line_feeds ? strlen(",\n ") : strlen(",");

This one worked on my machine. I've committed the patch with that change.
Thanks everyone for the reviews!

--
Nathan Bossart
Amazon Web Services: https://aws.amazon.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jeff Davis 2023-12-08 20:32:27 Re: Change GUC hashtable to use simplehash?
Previous Message Daniel Verite 2023-12-08 19:45:23 Re: Emitting JSON to file using COPY TO