Re: Add new for_each macros for iterating over a List that do not require ListCell pointer

From: Nathan Bossart <nathandbossart(at)gmail(dot)com>
To: Jelte Fennema-Nio <postgres(at)jeltef(dot)nl>
Cc: vignesh C <vignesh21(at)gmail(dot)com>, David Rowley <dgrowleyml(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Add new for_each macros for iterating over a List that do not require ListCell pointer
Date: 2024-01-03 22:13:11
Message-ID: 20240103221311.GA1595831@nathanxps13
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Jan 03, 2024 at 10:57:07PM +0100, Jelte Fennema-Nio wrote:
> Overall your light edits look good to me. The commit message is very
> descriptive and I like the shortening of the comments. The only thing
> I feel is that I think lost some my original intent is this sentence:
>
> + * different types. The outer loop only does a single iteration, so we expect
> + * optimizing compilers will unroll it, thereby optimizing it away.
>
> The "we expect" reads to me as if we're not very sure that compilers
> do this optimization. Even though we are quite sure. Maybe some small
> changes like this to clarify that.
>
> The outer loop only does a single iteration, so we expect that **any**
> optimizing compilers will unroll it, thereby optimizing it away. **We
> know for sure that gcc and clang do this optimization.**

WFM. Thanks for reviewing the edits.

--
Nathan Bossart
Amazon Web Services: https://aws.amazon.com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2024-01-03 22:13:24 Re: Add new for_each macros for iterating over a List that do not require ListCell pointer
Previous Message Jelte Fennema-Nio 2024-01-03 21:57:07 Re: Add new for_each macros for iterating over a List that do not require ListCell pointer