Re: Inlining of couple of functions in pl_exec.c improves performance - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: Inlining of couple of functions in pl_exec.c improves performance
Date
Msg-id 20200531023411.GB205907@paquier.xyz
Whole thread Raw
In response to Inlining of couple of functions in pl_exec.c improves performance  (Amit Khandekar <amitdkhan.pg@gmail.com>)
Responses Re: Inlining of couple of functions in pl_exec.c improves performance  (Amit Khandekar <amitdkhan.pg@gmail.com>)
List pgsql-hackers
On Sat, May 23, 2020 at 10:33:43PM +0530, Amit Khandekar wrote:
> By inlining of the two functions, found noticeable reduction in
> execution time as shown (figures are in milliseconds, averaged over
> multiple runs; taken from 'explain analyze' execution times) :
> ARM VM :
>    HEAD : 100 ; Patched : 88 => 13.6% improvement
> x86 VM :
>    HEAD :  71 ; Patched : 66 => 7.63% improvement.
>
> Then I included many assignment statements as shown in attachment
> assignmany.sql. This showed further benefit :
> ARM VM :
>    HEAD : 1820 ; Patched : 1549  => 17.5% improvement
> x86 VM :
>    HEAD : 1020 ; Patched :  869  => 17.4% improvement
>
> Inlining just exec_stmt() showed the improvement mainly on the arm64
> VM (7.4%). For x86, it was 2.7%
> But inlining exec_stmt() and exec_cast_value() together showed
> benefits on both machines, as can be seen above.

This stuff is interesting.  Do you have some perf profiles to share?
I am wondering what's the effect of the inlining with your test
cases.
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: Read access for pg_monitor to pg_replication_origin_status view
Next
From: Michael Paquier
Date:
Subject: Re: OpenSSL 3.0.0 compatibility