Re: Inlining of couple of functions in pl_exec.c improves performance
Amit Khandekar <amitdkhan.pg@gmail.com>
From: Amit Khandekar <amitdkhan.pg@gmail.com>
To: Pavel Stehule <pavel.stehule@gmail.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2020-05-26T03:36:12Z
Lists: pgsql-hackers
On Sat, 23 May 2020 at 23:24, Pavel Stehule <pavel.stehule@gmail.com> wrote: > > FOR counter IN 1..1800000 LOOP > id = 0; id = 0; id1 = 0; > id2 = 0; id3 = 0; id1 = 0; id2 = 0; > id3 = 0; id = 0; id = 0; id1 = 0; > id2 = 0; id3 = 0; id1 = 0; id2 = 0; > id3 = 0; > END LOOP; > > This is not too much typical PLpgSQL code. All expressions are not parametrized - so this test is little bit obscure. > > Last strange performance plpgsql benchmark did calculation of pi value. It does something real Yeah, basically I wanted to have many statements, and that too with many assignments where casts are not required. Let me check if I can come up with a real-enough testcase. Thanks.
Commits
-
Inline the fast path of plpgsql's exec_cast_value().
- fe2e206cdb00 14.0 landed
-
Inline plpgsql's exec_stmt() into exec_stmts().
- 1f902d499eda 14.0 landed