Re: [PATCH] heap_insert() and heap_update() optimization

2018-10-16 Thread Andres Freund
Hi, On 2018-10-17 09:48:19 +0300, Andrey Klychkov wrote: > > Interesting. That's with an optimized build, or an assertion build? > > Hello, > That was an optimized build. > > However I've just done some extra time tests and didn't notice so significant > difference as early. > Even more - avg o

Re[2]: [PATCH] heap_insert() and heap_update() optimization

2018-10-16 Thread Andrey Klychkov
> Interesting. That's with an optimized build, or an assertion build? Hello, That was an optimized build. However I've just done some extra time tests and didn't notice so significant difference as early. Even more - avg origin 1272, avg patched 1303. Maybe there was the autovacuum / analyze /

Re: [PATCH] heap_insert() and heap_update() optimization

2018-10-16 Thread Andres Freund
Hi, On 2018-10-16 11:28:17 +0300, Andrey Klychkov wrote: > I suggest the small attached patch that gives a bit of heap_insert() and > heap_update() optimization > by reducing calls of BufferGetPage(buffer) into them. > I measured call time of these: > heap_insert(): avg origin 13394 ns, avg patch

[PATCH] heap_insert() and heap_update() optimization

2018-10-16 Thread Andrey Klychkov
Hello, hackers I suggest the small attached patch that gives a bit of heap_insert() and heap_update() optimization by reducing calls of BufferGetPage(buffer) into them. I measured call time of these: heap_insert(): avg origin 13394 ns, avg patched 12685 ns; perf increases +5.59% heap_update(): av