On Thu, 28 May 2020 at 14:39, Pavel Stehule <pavel.stehule@gmail.com> wrote:
> I don't see 17% anywhere, but 3-5% is not bad.
Did you see 3-5% only for the pi function, or did you see the same
improvement also for the functions that I wrote ? I was getting a
consistent result of 14-18 % on both of the VMs. Also, is your test
machine running on Windows ? All the machines I tested were on Linux
kernel (Ubuntu)
Below are my results for your pi_est_1() function. For this function,
I am consistently getting 5-9 % improvement. I tested on 3 machines :
gcc : 8.4.0. -O2 option
OS : Ubuntu Bionic
explain analyze select pi_est_1(10000000)
1. x86_64 laptop VM (Intel Core i7-8665U)
HEAD : 2666 2617 2600 2630
Patched : 2502 2409 2460 2444
2. x86_64 VM (Xeon Gold 6151)
HEAD : 1664 1662 1721 1660
Patched : 1541 1548 1537 1526
3. ARM64 VM (Kunpeng)
HEAD : 2873 2864 2860 2861
Patched : 2568 2513 2501 2538
>
> patch 0001 has sense and can help with code structure
> patch 0002 it is little bit against simplicity, but for PLpgSQL with blocks structure it is correct.
Here, I moved the exec_stmt code into exec_stmts() function because
exec_stmts() was the only caller, and that function is not that big. I
am assuming you were referring to this point when you said it is a bit
against simplicity. But I didn't get what you implied by "but for
PLpgSQL with blocks structure it is correct"
--
Thanks,
-Amit Khandekar
Huawei Technologies