From: | Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com> |
---|---|
To: | Andrey Borodin <x4mmm(at)yandex-team(dot)ru> |
Cc: | Gasper Zejn <zejn(at)owca(dot)info>, pgsql-hackers(at)lists(dot)postgresql(dot)org |
Subject: | Re: pglz performance |
Date: | 2019-09-27 11:41:35 |
Message-ID: | 6d5eb102-87e5-9dc8-3cf0-dd218e65ab18@2ndquadrant.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 2019-09-04 14:45, Andrey Borodin wrote:
>> On 2019-09-04 11:22, Andrey Borodin wrote:
>>>> What about the two patches? Which one is better?
>>> On our observations pglz_decompress_hacked.patch is best for most of tested platforms.
>>> Difference is that pglz_decompress_hacked8.patch will not appply optimization if decompressed match is not greater than 8 bytes. This optimization was suggested by Tom, that's why we benchmarked it specifically.
>>
>> The patches attached to the message I was replying to are named
>>
>> 0001-Use-memcpy-in-pglz-decompression-for-long-matches.patch
>> 0001-Use-memcpy-in-pglz-decompression.patch
>>
>> Are those the same ones?
>
> Yes. Sorry for this confusion.
>
> The only difference of 0001-Use-memcpy-in-pglz-decompression-for-long-matches.patch is that it fallbacks to byte-loop if len is <= 8.
After reviewing this thread and more testing, I think
0001-Use-memcpy-in-pglz-decompression.patch appears to be a solid win
and we should move ahead with it.
I don't, however, fully understand the code changes, and I think this
could use more and better comments. In particular, I wonder about
off *= 2;
This is new logic that isn't explained anywhere.
This whole function is commented a bit strangely. It begins with
"Otherwise", but there is nothing before it. And what does "from OUTPUT
to OUTPUT" mean? There is no "output" variable. We should make this
match the code better.
--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
From | Date | Subject | |
---|---|---|---|
Next Message | Konstantin Knizhnik | 2019-09-27 12:07:18 | Re: Built-in connection pooler |
Previous Message | Fujii Masao | 2019-09-27 11:41:26 | Re: pg_wal/RECOVERYHISTORY file remains after archive recovery |