Re: [HACKERS] [PATCH] Generic type subscripting
От | Tom Lane |
---|---|
Тема | Re: [HACKERS] [PATCH] Generic type subscripting |
Дата | |
Msg-id | 1671560.1606939364@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: [HACKERS] [PATCH] Generic type subscripting (Dmitry Dolgov <9erthalion6@gmail.com>) |
Ответы |
Re: [HACKERS] [PATCH] Generic type subscripting
|
Список | pgsql-hackers |
Dmitry Dolgov <9erthalion6@gmail.com> writes: >> On Wed, Dec 02, 2020 at 12:58:51PM -0500, Tom Lane wrote: >> So ... one of the things that's been worrying me about this patch >> from day one is whether it would create a noticeable performance >> penalty for existing use-cases. I did a small amount of experimentation >> about that with the v35 patchset, and it didn't take long at all to >> find that this: >> ... >> is about 15% slower with the patch than with HEAD. I'm not sure >> what an acceptable penalty might be, but 15% is certainly not it. > I've tried to reproduce that, but get ~2-4% slowdown (with a pinned > backend, no turbo etc). Are there any special steps I've probably > missed? Hmm, no, I just built with --disable-cassert and otherwise my usual development options. I had experimented with some other variants of the test case, where the repeated statement is a[i] := i; -- about the same a[i] := a[i-1] + 1; -- 7% slower a[i] := a[i-1] - a[i-2]; -- 15% slower so it seems clear that the penalty is on the array fetch not array assign side. This isn't too surprising now that I think about it, because plpgsql's array assignment code is untouched by the patch (which is a large feature omission BTW: you still can't write jsonb['x'] := y; in plpgsql). regards, tom lane
В списке pgsql-hackers по дате отправления: