Micro-optimize datum_to_json_internal() some more. Commit dc3f9bc549 mainly targeted the JSONTYPE_NUMERIC code path. This commit applies similar optimizations (e.g., removing unnecessary runtime calls to strlen() and palloc()) to nearby code.
Reviewed-by: Tom Lane Discussion: https://postgr.es/m/20231208203708.GA4126315%40nathanxps13 Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/0d1adae6f739273046705acaf5314384e8a73a18 Modified Files -------------- src/backend/utils/adt/json.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-)