Re: Add new for_each macros for iterating over a List that do not require ListCell pointer
В списке pgsql-hackers по дате отправления:
| От | Tom Lane |
|---|---|
| Тема | Re: Add new for_each macros for iterating over a List that do not require ListCell pointer |
| Дата | |
| Msg-id | 338012.1704320004@sss.pgh.pa.us обсуждение |
| Ответ на | Re: Add new for_each macros for iterating over a List that do not require ListCell pointer (Jelte Fennema-Nio <postgres@jeltef.nl>) |
| Ответы |
Re: Add new for_each macros for iterating over a List that do not require ListCell pointer
|
| Список | pgsql-hackers |
Jelte Fennema-Nio <postgres@jeltef.nl> writes:
> 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.**
I like Nathan's wording. Your assertion is contradicted by cases as
obvious as -O0, and I'm sure a lot of other holes could be poked in it
as well (e.g, just how far back might gcc choose to do that unrolling?
Does the size of the loop body matter?)
regards, tom lane
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера