Re: simplehash.h: "SH_SCOPE static" causes warnings
| От | Andres Freund |
|---|---|
| Тема | Re: simplehash.h: "SH_SCOPE static" causes warnings |
| Дата | |
| Msg-id | 20240409185616.nourxxo3gtec4krc@awork3.anarazel.de обсуждение исходный текст |
| Ответ на | [MASSMAIL]simplehash.h: "SH_SCOPE static" causes warnings (Jeff Davis <pgsql@j-davis.com>) |
| Ответы |
Re: simplehash.h: "SH_SCOPE static" causes warnings
|
| Список | pgsql-hackers |
Hi, On 2024-04-09 11:10:15 -0700, Jeff Davis wrote: > The reason I'm suggesting it there is because the hash table is used > only for the indexed binary heap, not an ordinary binary heap, so I'd > like to leave it up to the compiler whether to do any inlining or not. FWIW, with just about any modern-ish compiler just using "inline" doesn't actually force inlining, it just changes the cost model to make it more likely. > If someone thinks the attached patch is a good change to commit now, > please let me know. Otherwise, I'll recommend "static inline" in the > above thread and leave the attached patch to be considered for v18. I'm not opposed. I'd however at least add a comment explaining why this is being used. Arguably it doesn't make sense to add it to *_create(), as without that there really isn't a point in having a simplehash instantiation. Might make it slightly easier to notice obsoleted uses of simplehash. Greetings, Andres Freund
В списке pgsql-hackers по дате отправления: