| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | David Rowley <dgrowleyml(at)gmail(dot)com> |
| Cc: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: [PATCH] Remove some duplicate if conditions |
| Date: | 2014-01-02 17:59:55 |
| Message-ID: | 384.1388685595@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
David Rowley <dgrowleyml(at)gmail(dot)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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Robert Haas | 2014-01-02 18:00:31 | Re: fix_PGSTAT_NUM_TABENTRIES_macro patch |
| Previous Message | Tom Lane | 2014-01-02 17:46:34 | Re: preserving forensic information when we freeze |