Re: Speed up JSON escape processing with SIMD plus other optimisations
От
Andrew Dunstan
Тема
Re: Speed up JSON escape processing with SIMD plus other optimisations
Дата
Msg-id
05926066-7af1-467e-80bb-470cf0f0f2fc@dunslane.net
Ответ на
Список
Дерево обсуждения
Speed up JSON escape processing with SIMD plus other optimisations David Rowley <dgrowleyml@gmail.com>
Re: Speed up JSON escape processing with SIMD plus other optimisations David Rowley <dgrowleyml@gmail.com>
Re: Speed up JSON escape processing with SIMD plus other optimisations Andrew Dunstan <andrew@dunslane.net>
Re: Speed up JSON escape processing with SIMD plus other optimisations David Rowley <dgrowleyml@gmail.com>
Re: Speed up JSON escape processing with SIMD plus other optimisations Melih Mutlu <m.melihmutlu@gmail.com>
Re: Speed up JSON escape processing with SIMD plus other optimisations Andrew Dunstan <andrew@dunslane.net>
Re: Speed up JSON escape processing with SIMD plus other optimisations David Rowley <dgrowleyml@gmail.com>
Re: Speed up JSON escape processing with SIMD plus other optimisations David Rowley <dgrowleyml@gmail.com>
Re: Speed up JSON escape processing with SIMD plus other optimisations Heikki Linnakangas <hlinnaka@iki.fi>
Re: Speed up JSON escape processing with SIMD plus other optimisations David Rowley <dgrowleyml@gmail.com>
Re: Speed up JSON escape processing with SIMD plus other optimisations David Rowley <dgrowleyml@gmail.com>
Re: Speed up JSON escape processing with SIMD plus other optimisations David Rowley <dgrowleyml@gmail.com>
Re: Speed up JSON escape processing with SIMD plus other optimisations David Rowley <dgrowleyml@gmail.com>
On 2024-06-11 Tu 08:08, Melih Mutlu wrote:
Hi David,Thanks for the patch.In 0001 patch, I see that there are some escape_json() calls with NUL-terminated strings and gets the length by calling strlen(), like below:- escape_json(&buf, "timestamp");
+ escape_json(&buf, "timestamp", strlen("timestamp"));Wouldn't using escape_json_cstring() be better instead? IIUC there isn't much difference between escape_json() and escape_json_cstring(), right? We would avoid strlen() with escape_json_cstring().
or maybe use sizeof("timestamp") - 1
cheers
andrew
-- Andrew Dunstan EDB: https://www.enterprisedb.com
В списке pgsql-hackers по дате отправления
От: Melih Mutlu
Дата:
От: David Rowley
Дата: