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

Поиск
Список
Период
Сортировка
От Chao Li
Тема Re: pg_basebackup: removed an unnecessary use of memset in FindStreamingStart
Дата
Msg-id 4972EBFA-46C0-4431-8392-4EDA58BB6CF0@gmail.com
обсуждение исходный текст
Ответ на Re: pg_basebackup: removed an unnecessary use of memset in FindStreamingStart  (Daniel Gustafsson <daniel@yesql.se>)
Ответы Re: pg_basebackup: removed an unnecessary use of memset in FindStreamingStart
Список pgsql-hackers

> On Feb 25, 2026, at 18:21, Daniel Gustafsson <daniel@yesql.se> wrote:
>
>> 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
>

I don’t think this patch is about performance. Although removing the memset might save a few CPU cycles, the real
benefitseems to be cleanup and consistency. The memset appears unnecessary, and similar functions don’t use it, so I
thinkthis change mainly improves maintainability. 

Best regards,
--
Chao Li (Evan)
HighGo Software Co., Ltd.
https://www.highgo.com/







В списке pgsql-hackers по дате отправления: