Re: pg_basebackup: removed an unnecessary use of memset in FindStreamingStart

From: Daniel Gustafsson <daniel(at)yesql(dot)se>
To: yangyz <1197620467(at)qq(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: pg_basebackup: removed an unnecessary use of memset in FindStreamingStart
Date: 2026-02-25 10:21:17
Message-ID: 1DF9E315-BDD9-4D64-97FE-5DBF3FDCC319@yesql.se
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> On 25 Feb 2026, at 07:31, yangyz <1197620467(at)qq(dot)com> wrote:

> 2.Performance Overhead
> In each iteration, the entire buffer of size LZ4_CHUNK_SZ (potentially several megabytes) is zero-initialized. Since these memory blocks are immediately overwritten by decompressed data, this zeroing operation constitutes an unnecessary consumption of 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bertrand Drouvot 2026-02-25 10:21:57 Re: Warning-suppression fixes we ought to back-patch
Previous Message Tatsuo Ishii 2026-02-25 10:16:50 Re: Row pattern recognition