Re: [PATCH v1] elog.c: Remove special case which avoided %*s format strings..

2020-08-05 Thread Michael Paquier
On Tue, Aug 04, 2020 at 09:06:16PM +1200, David Rowley wrote: > FWIW, the tests I did to check this when initially working on it are > in [1]. Justin, it would be good if you could verify you're making as > bad as what's mentioned on that thread again. Ouch. Thanks for the reference. Indeed it

Re: [PATCH v1] elog.c: Remove special case which avoided %*s format strings..

2020-08-04 Thread David Rowley
On Tue, 4 Aug 2020 at 19:36, Michael Paquier wrote: > Did you check if our implementation of src/port/snprintf.c makes %*s > much slower than %s or not? FWIW, I have just run a small test on my > laptop, and running 100M calls of snprintf() with "%s" in a tight loop > takes 2.7s, with "%*s" and a

Re: [PATCH v1] elog.c: Remove special case which avoided %*s format strings..

2020-08-04 Thread Michael Paquier
On Sun, Aug 02, 2020 at 11:59:48PM -0500, Justin Pryzby wrote: > ..which should no longer be needed since it was a performance hack for > specific > platform snprintf, which are no longer used. Did you check if our implementation of src/port/snprintf.c makes %*s much slower than %s or not? FWIW,

[PATCH v1] elog.c: Remove special case which avoided %*s format strings..

2020-08-02 Thread Justin Pryzby
ial case which avoided %*s format strings.. ..which should no longer be needed since it was a performance hack for specific platform snprintf, which are no longer used. See also: 4334639f4 Allow printf-style padding specifications in log_line_prefix. 96bf88d52 Always use our own versions of *pri