Re: [PATCH] Remove some duplicate if conditions

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [PATCH] Remove some duplicate if conditions
Дата
Msg-id 384.1388685595@sss.pgh.pa.us
обсуждение исходный текст
Ответ на [PATCH] Remove some duplicate if conditions  (David Rowley <dgrowleyml@gmail.com>)
Ответы Re: [PATCH] Remove some duplicate if conditions  (David Rowley <dgrowleyml@gmail.com>)
Список pgsql-hackers
David Rowley <dgrowleyml@gmail.com> writes:
> I've attached a simple patch which removes some duplicate if conditions
> that seemed to have found their way into the code.

> These are per PVS-Studio's warnings.

-1.  If PVS-Studio is complaining about this type of coding, to hell with
it; it should just optimize away the extra tests and be quiet about it,
not opinionate about coding style.  What you propose would cause logically
independent pieces of code to become tied together, and I don't find that
to be an improvement.  It's the compiler's job to micro-optimize where
possible, and most compilers that I've seen will do that rather than tell
the programmer he ought to do it.
        regards, tom lane




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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: preserving forensic information when we freeze
Следующее
От: Robert Haas
Дата:
Сообщение: Re: fix_PGSTAT_NUM_TABENTRIES_macro patch