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)
Список
Дерево обсуждения
[PATCH] Remove some duplicate if conditions David Rowley <dgrowleyml@gmail.com>
Re: [PATCH] Remove some duplicate if conditions Tom Lane <tgl@sss.pgh.pa.us>
Re: [PATCH] Remove some duplicate if conditions David Rowley <dgrowleyml@gmail.com>
David Rowley 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 по дате отправления