Re: plenty code is confused about function level static

From: Peter Eisentraut <peter(at)eisentraut(dot)org>
To: "Andrey M(dot) Borodin" <x4mmm(at)yandex-team(dot)ru>, Andres Freund <andres(at)anarazel(dot)de>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: plenty code is confused about function level static
Date: 2024-04-18 08:59:33
Message-ID: 3b61f093-ce3c-4ab0-86bc-6727ef35bc5c@eisentraut.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 18.04.24 10:43, Andrey M. Borodin wrote:
>> On 18 Apr 2024, at 02:39, Andres Freund <andres(at)anarazel(dot)de> wrote:
>>
>> There are lots of places that could benefit from adding 'static
>> const'.
>
> +1 for helping compiler.
> GCC has a -Wsuggest-attribute=const, we can count these warnings and threat increase as an error :)

This is different. It's an attribute, not a qualifier, and it's for
functions, not variables. But it could undoubtedly also have a
performance benefit.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tomas Vondra 2024-04-18 09:35:43 Re: brininsert optimization opportunity
Previous Message Andrei Lepikhov 2024-04-18 08:54:45 Re: POC: GROUP BY optimization