public inbox for [email protected]  
help / color / mirror / Atom feed
From: Daniel Gustafsson <[email protected]>
To: Alvaro Herrera <[email protected]>
Cc: XChy <[email protected]>
Cc: [email protected]
Subject: Re: Missed compiler optimization issue in function select_rtable_names_for_explain
Date: Wed, 22 May 2024 20:12:36 +0200
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>

> On 22 May 2024, at 13:00, Alvaro Herrera <[email protected]> wrote:

> I think if we want to improve how this code is seen by the compiler by
> modifying it, we should just remove the NULL/NIL assignments.

*If* the optimization is measurable, IMHO.

> It's a
> pretty arbitrary (and rather small) subset of fields being initialized,
> fields which very obviously have been zeroed by memset already, so I
> don't see any value in the explicit assignments.

My personal opinion is that there is value in immediately knowing the type of
the members from the inits, in this case I know without looking up the
definition that some of the members are list.  I like that readability.  That
being said, I for sure won't fight if there is concensus to remove.

--
Daniel Gustafsson







view thread (4+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected]
  Subject: Re: Missed compiler optimization issue in function select_rtable_names_for_explain
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox