Re: Missed compiler optimization issue in function select_rtable_names_for_explain

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
Cc: XChy <xxs_chy(at)outlook(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: Missed compiler optimization issue in function select_rtable_names_for_explain
Date: 2024-05-22 20:05:32
Message-ID: 6806.1716408332@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> writes:
> 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. 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.

I have to concede that it's unclear why we're filling just these
fields explicitly and not any others. We're at least consistent:
all the callers of select_rtable_names do it the same way.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Dirschel, Steve 2024-05-22 20:42:39 Hash join and picking which result set to build the hash table with.
Previous Message Pavel Stehule 2024-05-22 19:40:52 Re: search_path and SET ROLE