Re: Inlining of couple of functions in pl_exec.c improves performance

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Amit Khandekar <amitdkhan(dot)pg(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Inlining of couple of functions in pl_exec.c improves performance
Date: 2020-05-31 02:34:11
Message-ID: 20200531023411.GB205907@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2020-05-31 02:52:15 Re: OpenSSL 3.0.0 compatibility
Previous Message Michael Paquier 2020-05-31 02:02:20 Re: Read access for pg_monitor to pg_replication_origin_status view