Re: slab allocator performance issues - Mailing list pgsql-hackers

From David Rowley
Subject Re: slab allocator performance issues
Date
Msg-id CAApHDvoiKik7gGvP+PAE9jBCogmnez06r7+SP+wMdwCHsoTWmA@mail.gmail.com
Whole thread Raw
In response to Re: slab allocator performance issues  (Ranier Vilela <ranier.vf@gmail.com>)
Responses Re: slab allocator performance issues  (Ranier Vilela <ranier.vf@gmail.com>)
List pgsql-hackers
On Tue, 20 Jul 2021 at 10:04, Ranier Vilela <ranier.vf@gmail.com> wrote:
> Perhaps you would agree with me that in the most absolute of times, malloc will not fail.
> So it makes more sense to test:
> if (ret != NULL)
> than
> if (ret == NULL)

I think it'd be better to use unlikely() for that.

David



pgsql-hackers by date:

Previous
From: Tomas Vondra
Date:
Subject: Re: POC: GROUP BY optimization
Next
From: Ranier Vilela
Date:
Subject: Re: slab allocator performance issues