Re: plenty code is confused about function level static - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: plenty code is confused about function level static
Date
Msg-id 3b61f093-ce3c-4ab0-86bc-6727ef35bc5c@eisentraut.org
Whole thread Raw
In response to Re: plenty code is confused about function level static  ("Andrey M. Borodin" <x4mmm@yandex-team.ru>)
List pgsql-hackers
On 18.04.24 10:43, Andrey M. Borodin wrote:
>> On 18 Apr 2024, at 02:39, Andres Freund <andres@anarazel.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.




pgsql-hackers by date:

Previous
From: Andrei Lepikhov
Date:
Subject: Re: POC: GROUP BY optimization
Next
From: Tomas Vondra
Date:
Subject: Re: brininsert optimization opportunity