Re: pg_basebackup: removed an unnecessary use of memset in FindStreamingStart - Mailing list pgsql-hackers

From Daniel Gustafsson
Subject Re: pg_basebackup: removed an unnecessary use of memset in FindStreamingStart
Date
Msg-id 1DF9E315-BDD9-4D64-97FE-5DBF3FDCC319@yesql.se
Whole thread Raw
In response to pg_basebackup: removed an unnecessary use of memset in FindStreamingStart  ("yangyz" <1197620467@qq.com>)
Responses Re: pg_basebackup: removed an unnecessary use of memset in FindStreamingStart
List pgsql-hackers
> On 25 Feb 2026, at 07:31, yangyz <1197620467@qq.com> wrote:

> 2.Performance Overhead
> In each iteration, the entire buffer of size LZ4_CHUNK_SZ (potentially several megabytes) is zero-initialized. Since
thesememory blocks are immediately overwritten by decompressed data, this zeroing operation constitutes an unnecessary
consumptionof CPU resources. 

When proposing a performance improvement it's important to provide some level
of benchmarks to show the improvement. Is removing this memset noticeable?

--
Daniel Gustafsson




pgsql-hackers by date:

Previous
From: Tatsuo Ishii
Date:
Subject: Re: Row pattern recognition
Next
From: Bertrand Drouvot
Date:
Subject: Re: Warning-suppression fixes we ought to back-patch