Re: Convert macros to static inline functions

2025-02-11 Thread Peter Eisentraut
On 31.01.25 14:29, Maxim Orlov wrote: Great job! I've been working on the 64 XIDs patch for years, and I've never liked this place.  On the other hand, as we know, inlining does not always work since it only suggests to the compiler to do it. After all, many of these calls are used in pretty "ho

Re: Convert macros to static inline functions

2025-01-31 Thread Maxim Orlov
On Thu, 23 Jan 2025 at 14:39, Peter Eisentraut < peter.eisentr...@enterprisedb.com> wrote: > On 27.12.24 11:16, Peter Eisentraut wrote: > > On 16.05.22 10:27, Peter Eisentraut wrote: > >> Inspired by [0], I looked to convert more macros to inline functions. > > > > This is an older thread where I

Re: Convert macros to static inline functions

2025-01-23 Thread Peter Eisentraut
On 27.12.24 11:16, Peter Eisentraut wrote: On 16.05.22 10:27, Peter Eisentraut wrote: Inspired by [0], I looked to convert more macros to inline functions. This is an older thread where I left something unfinished: Note 2: Many macros in htup_details.h operate both on HeapTupleHeader and on

Re: Convert macros to static inline functions

2024-12-27 Thread Peter Eisentraut
Eisentraut Date: Fri, 27 Dec 2024 11:07:35 +0100 Subject: [PATCH 2/3] Convert macros to static inline functions (htup_details.h, itup.h) --- contrib/pageinspect/heapfuncs.c | 15 +- src/include/access/htup_details.h | 543 ++ src/include/access/itup.h | 2

Re: Convert macros to static inline functions

2022-10-07 Thread Peter Eisentraut
On 04.10.22 08:57, Amul Sul wrote: On Tue, Oct 4, 2022 at 12:00 PM Peter Eisentraut wrote: On 16.05.22 10:27, Peter Eisentraut wrote: Inspired by [0], I looked to convert more macros to inline functions. Here is another one from the same batch of work that I somehow didn't send in last time

Re: Convert macros to static inline functions

2022-10-03 Thread Amul Sul
On Tue, Oct 4, 2022 at 12:00 PM Peter Eisentraut wrote: > > On 16.05.22 10:27, Peter Eisentraut wrote: > > Inspired by [0], I looked to convert more macros to inline functions. > > Here is another one from the same batch of work that I somehow didn't > send in last time. > I think assertion can be

Re: Convert macros to static inline functions

2022-10-03 Thread Peter Eisentraut
cro at all, rather than a normal external function.) From 6d1e97d8d03e2a01842dacd3528bf2dbf40377cf Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Tue, 19 Jul 2022 06:58:12 +0200 Subject: [PATCH] Convert macros to static inline functions (rel.h) --- src/include/utils/rel.h | 23

Re: Convert macros to static inline functions

2022-06-08 Thread Peter Geoghegan
On Mon, May 16, 2022 at 1:28 AM Peter Eisentraut wrote: > Inspired by [0], I looked to convert more macros to inline functions. > The attached patches are organized "bottom up" in terms of their API > layering; some of the later ones depend on some of the earlier ones. Big +1 from me. I converte

Re: Convert macros to static inline functions

2022-05-22 Thread Peter Eisentraut
m *) T); + else +#endif Can we have a switch case like store_att_byval() instead of if-else, code would look more symmetric, IMO. doneFrom 75cc12a425a58340799376bc1e2dfdebfcb7ea0a Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Mon, 23 May 2022 07:28:13 +0200 Subject: [PATCH v2] Conv

Re: Convert macros to static inline functions

2022-05-16 Thread Alvaro Herrera
On 2022-May-16, Amul Sul wrote: > +static inline OffsetNumber > +PageGetMaxOffsetNumber(Page page) > +{ > + if (((PageHeader) page)->pd_lower <= SizeOfPageHeaderData) > + return 0; > + else > + return PageHeader) page)->pd_lower - SizeOfPageHeaderData) > / sizeof(ItemIdData));

Re: Convert macros to static inline functions

2022-05-16 Thread Amul Sul
On Mon, May 16, 2022 at 1:58 PM Peter Eisentraut wrote: > > > Inspired by [0], I looked to convert more macros to inline functions. > The attached patches are organized "bottom up" in terms of their API > layering; some of the later ones depend on some of the earlier ones. > All the patches look

Convert macros to static inline functions

2022-05-16 Thread Peter Eisentraut
00:00:00 2001 From: Peter Eisentraut Date: Mon, 16 May 2022 09:58:13 +0200 Subject: [PATCH] Convert macros to static inline functions (block.h) Remove BlockIdIsValid(), which wasn't used and is unnecessary. Remove BlockIdCopy(), which wasn't used and can be done by struct assignment. (