Re: Tidy fill hstv array (src/backend/access/heap/pruneheap.c)

2024-03-04 Thread Andres Freund
Hi, On 2024-03-04 08:47:11 -0300, Ranier Vilela wrote: > Does filling a memory area, one by one, with branches, need strong evidence > to prove that it is better than filling a memory area, all at once, without > branches? That's a bogus comparison: a) the memset version modifies the whole

Re: Tidy fill hstv array (src/backend/access/heap/pruneheap.c)

2024-03-04 Thread Andrey M. Borodin
> On 4 Mar 2024, at 16:47, Ranier Vilela wrote: > > Does filling a memory area, one by one, with branches, need strong evidence > to prove that it is better than filling a memory area, all at once, without > branches? I apologise for being too quick to decide to mark the patch RwF. Wold

Re: Tidy fill hstv array (src/backend/access/heap/pruneheap.c)

2024-03-04 Thread Ranier Vilela
Em seg., 4 de mar. de 2024 às 03:18, Andrey M. Borodin escreveu: > > > > On 14 Jan 2024, at 18:55, John Naylor wrote: > > > > On Sat, Jan 13, 2024 at 9:36 PM Ranier Vilela > wrote: > >> > >> Em ter., 9 de jan. de 2024 às 06:31, John Naylor < > johncnaylo...@gmail.com> escreveu: > > > >>> This

Re: Tidy fill hstv array (src/backend/access/heap/pruneheap.c)

2024-03-03 Thread Andrey M. Borodin
> On 14 Jan 2024, at 18:55, John Naylor wrote: > > On Sat, Jan 13, 2024 at 9:36 PM Ranier Vilela wrote: >> >> Em ter., 9 de jan. de 2024 às 06:31, John Naylor >> escreveu: > >>> This just moves an operation from one place to the other, while >>> obliterating the explanatory comment, so I

Re: Tidy fill hstv array (src/backend/access/heap/pruneheap.c)

2024-01-14 Thread John Naylor
On Sat, Jan 13, 2024 at 9:36 PM Ranier Vilela wrote: > > Em ter., 9 de jan. de 2024 às 06:31, John Naylor > escreveu: >> This just moves an operation from one place to the other, while >> obliterating the explanatory comment, so I don't see an advantage. > > Well, I think that is precisely the

Re: Tidy fill hstv array (src/backend/access/heap/pruneheap.c)

2024-01-13 Thread Ranier Vilela
Em ter., 9 de jan. de 2024 às 06:31, John Naylor escreveu: > On Thu, Dec 28, 2023 at 7:58 PM Ranier Vilela wrote: > > I think it would be more productive to initialize the entire array with > -1, and avoid flagging, one by one, the items that should be -1. > > This just moves an operation from

Re: Tidy fill hstv array (src/backend/access/heap/pruneheap.c)

2024-01-09 Thread John Naylor
On Thu, Dec 28, 2023 at 7:58 PM Ranier Vilela wrote: > I think it would be more productive to initialize the entire array with -1, > and avoid flagging, one by one, the items that should be -1. This just moves an operation from one place to the other, while obliterating the explanatory comment,

Tidy fill hstv array (src/backend/access/heap/pruneheap.c)

2023-12-28 Thread Ranier Vilela
Hi, The function heap_page_prune (src/backend/access/heap/pruneheap.c) Has a comment: "/* * presult->htsv is not initialized here because all ntuple spots in the * array will be set either to a valid HTSV_Result value or -1. */ IMO, this is a little bogus and does not make sense. I think it