Re: slab allocator performance issues

From: David Rowley <dgrowleyml(at)gmail(dot)com>
To: Ranier Vilela <ranier(dot)vf(at)gmail(dot)com>
Cc: Andres Freund <andres(at)anarazel(dot)de>, Tomas Vondra <tomas(dot)vondra(at)enterprisedb(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>, Tomas Vondra <tv(at)fuzzy(dot)cz>
Subject: Re: slab allocator performance issues
Date: 2021-07-20 14:15:07
Message-ID: CAApHDvoiKik7gGvP+PAE9jBCogmnez06r7+SP+wMdwCHsoTWmA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, 20 Jul 2021 at 10:04, Ranier Vilela <ranier(dot)vf(at)gmail(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Ranier Vilela 2021-07-20 14:24:50 Re: slab allocator performance issues
Previous Message Tomas Vondra 2021-07-20 13:12:38 Re: POC: GROUP BY optimization