Re: [PATCH v2] src/port/snprintf.c: Optimize the common base=10 case in fmtint

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: [PATCH v2] src/port/snprintf.c: Optimize the common base=10 case in fmtint
Дата
Msg-id 20211028202749.ow2kuli7eeoptifi@alap3.anarazel.de
обсуждение исходный текст
Ответ на Re: [PATCH v2] src/port/snprintf.c: Optimize the common base=10 case in fmtint  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: [PATCH v2] src/port/snprintf.c: Optimize the common base=10 case in fmtint  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Hi,

On 2021-10-28 13:46:49 -0400, Tom Lane wrote:
> Personally, I failed to measure any speedup at all on pgbench, either
> in the init phase or regular transactions; whatever difference there
> may be is below the noise level.  However, I wrote a simple C function
> with a tight loop around snprintf(), and that showed about a 2X
> improvement, so there is some win here.

Odd - at least with an earlier patch I saw optimized pgbench initialization go
down by ~25%.


> I went ahead and pushed it with a rewritten comment.

Imo the code now is a bit odd, because we first switch (type) setting base,
and then separately have branches for the different bases.

Greetings,

Andres Freund



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: Minimal logical decoding on standbys
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [PATCH v2] src/port/snprintf.c: Optimize the common base=10 case in fmtint