From: Tomas Vondra <tomas.vondra@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Use memcpy instead of a byte loop in pglz_decompress
Date: Thu, 28 Nov 2019 22:42:28 +0000
Message-ID: <E1iaSUW-0000tQ-Cl@gemulon.postgresql.org> (raw)
Use memcpy instead of a byte loop in pglz_decompress
The byte loop used in pglz_decompress() because of possible overlap may
be quite inefficient, so this commit replaces it with memcpy. The gains
do depend on the data (compressibility) and hardware, but seem to be
quite significant.
Author: Andrey Borodin
Reviewed-by: Michael Paquier, Konstantin Knizhnik, Tels
Discussion: https://postgr.es/m/469C9ED9-348C-4FE7-A7A7-B0FA671BEE4C@yandex-team.ru
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/c60e520f6e0e8db9618cad042df071a6752f3c06
Modified Files
--------------
src/common/pg_lzcompress.c | 52 ++++++++++++++++++++++++++++++++++++----------
1 file changed, 41 insertions(+), 11 deletions(-)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: tomas.vondra@postgresql.org
Subject: Re: pgsql: Use memcpy instead of a byte loop in pglz_decompress
In-Reply-To: <E1iaSUW-0000tQ-Cl@gemulon.postgresql.org>
References: <E1iaSUW-0000tQ-Cl@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox