Re: [PATCH] Change simple_heap_insert() to a macro

2018-11-02 Thread Peter Eisentraut
On 12/10/2018 12:09, Andrey Klychkov wrote: > I don't see any reasons against to use the proposed macro instead of > this function. Macros are weird and should be avoided if possible. If we were to do this, it should be an inline function, I think. But I think it's not useful here. I think ther

Re: Re[2]: [PATCH] Change simple_heap_insert() to a macro

2018-10-15 Thread Tom Lane
=?UTF-8?B?QW5kcmV5IEtseWNoa292?= writes: >>  simple_heap_insert() is used in catalog updates and such. Does that have >>  any measurable performance impact? > I guess this change doesn't give us an incredible performance increase except > there will no redundant function call. > I don't see any

Re[2]: [PATCH] Change simple_heap_insert() to a macro

2018-10-12 Thread Andrey Klychkov
> simple_heap_insert() is used in catalog updates and such. Does that have > any measurable performance impact? I guess this change doesn't give us an incredible performance increase except there will no redundant function call. I don't see any reasons against to use the proposed macro instead of

Re: [PATCH] Change simple_heap_insert() to a macro

2018-10-12 Thread Heikki Linnakangas
On 12/10/2018 11:54, Andrey Klychkov wrote: Studying another question I noticed a small point for optimization. In the src/backend/access/heap/heapam.c we have the function: - * simple_heap_insert - insert a tuple - * - * Currently, this routine differs from heap_insert only in supplying - * a

[PATCH] Change simple_heap_insert() to a macro

2018-10-12 Thread Andrey Klychkov
Hi, Hackers Studying another question I noticed a small point for optimization. In the src/backend/access/heap/heapam.c we have the function: - * simple_heap_insert - insert a tuple - * - * Currently, this routine differs from heap_insert only in supplying - * a default command ID and not allowing