Re: computing completion tag is expensive for pgbench -S -M prepared
В списке pgsql-hackers по дате отправления:
| От | Andres Freund |
|---|---|
| Тема | Re: computing completion tag is expensive for pgbench -S -M prepared |
| Дата | |
| Msg-id | 20180607182104.y526arpl3bt6x3bk@alap3.anarazel.de обсуждение |
| Ответ на | Re: computing completion tag is expensive for pgbench -S -M prepared (Tom Lane <tgl@sss.pgh.pa.us>) |
| Список | pgsql-hackers |
On 2018-06-07 10:30:14 -0400, Tom Lane wrote:
> Andres Freund <andres@anarazel.de> writes:
> > ... That's actually fairly trivial to optimize - we don't
> > need the full blown snprintf machinery here. A quick benchmark
> > replacing it with:
>
> > memcpy(completionTag, "SELECT ", sizeof("SELECT "));
> > pg_lltoa(nprocessed, completionTag + 7);
>
> While I don't have any objection to this change if the speedup is
> reproducible, I do object to spelling the same constant as
> 'sizeof("SELECT ")' and '7' on adjacent lines ...
Hah, yes. Nor would I want to keep the #if 0 around it ;). I mostly
wanted to know whether others can reproduce the effect - the actual
patch would need to be bigger and affect more places.
Greetings,
Andres Freund
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера