Re: Remove redundant strlen call in ReplicationSlotValidateName

From: Ranier Vilela <ranier(dot)vf(at)gmail(dot)com>
To: Peter Smith <smithpb2250(at)gmail(dot)com>
Cc: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, David Rowley <dgrowleyml(at)gmail(dot)com>, Japin Li <japinli(at)hotmail(dot)com>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>, "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Remove redundant strlen call in ReplicationSlotValidateName
Date: 2021-07-19 00:38:30
Message-ID: CAEudQArFUJ62=zdJefPLwB+vU7DDr0kWV2yTYUn2Rnn0CS-doA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Em dom., 18 de jul. de 2021 às 21:23, Peter Smith <smithpb2250(at)gmail(dot)com>
escreveu:

>
>
> On Sun, Jul 18, 2021 at 11:09 PM Ranier Vilela <ranier(dot)vf(at)gmail(dot)com>
> wrote:
>
>> ...
>>
> I did the patch, but to my surprise, the results weren't so good.
>> Despite that claiming a tiny improvement in performance, I didn't expect
>> any slowdown.
>> I put a counter in pg_regress.c, summing the results of each test and did
>> it three times for HEAD and for the patch.
>> Some tests were better, but others were bad.
>> Tests comments per example, show 180%, combocid 174%, dbize 165%, xmlmap
>> 136%, lock 134%.
>>
>> ... ...
>>
>> So I'm posting the patch here, merely as an illustration of my findings.
>> Perhaps someone with a better understanding of the process of translating
>> C to asm can have an explanation.
>> Is it worth it to change only where there has been improvement?
>>
>>
> My guess is that your hypothetical performance improvement has been
> completely swamped by the natural variations of each run.
>
> For example,
> drop_if_exists 115 84 83 94
> 138 63 57 86 109,30%
>
> Those numbers are all over the place, so I doubt the results are really
> saying anything at all about what is better/worse, because I think you have
> zero chance to notice a couple of nanoseconds of improvement within the
> noise when each run is varying from 57 to 138 ms.
>
> IMO the only conclusion you can draw from your results is that any
> performance gain is too small to be observable.
>
Thanks Peter for your explanations.

I can conclude then that the test results are not a reference for
performance/regression.
So the patch serves as a refactoring, without any further indication.

regards,
Ranier Vilela

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Kyotaro Horiguchi 2021-07-19 01:16:18 Re: 回复: Why is XLOG_FPI_FOR_HINT always need backups?
Previous Message Thomas Munro 2021-07-19 00:28:34 Re: O_DIRECT on macOS