Re: Avoid unecessary MemSet call (src/backend/utils/cache/relcache.c)

Поиск
Список
Период
Сортировка
От Ranier Vilela
Тема Re: Avoid unecessary MemSet call (src/backend/utils/cache/relcache.c)
Дата
Msg-id CAEudQApx3LXxx0xANrTTaufGxS3AHOf=soOB+CBfW1v7JjR8hA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Avoid unecessary MemSet call (src/backend/utils/cache/relcache.c)  (mahendrakar s <mahendrakarforpg@gmail.com>)
Список pgsql-hackers
Em ter., 2 de ago. de 2022 às 10:17, mahendrakar s <mahendrakarforpg@gmail.com> escreveu:
Hi Ranier,

I'm pretty late to thread but would like to know about your claim in the thread:
`All compilers currently have memset optimized.`
What did I mean, modern compilers.

I know one case of optimization where variable is not used after the memset.
Probably, the compiler decided to remove the variable altogether.
The most common is to remove the padding, when he understands that this is possible and safe.
This does not mean that this will happen in all cases.
The point here is, this is only possible when using memset.
 
Are the cases for which the optimization is done consistent across all the compilers?
Of course not. But it does not matter.

regards,
Ranier Vilela

В списке pgsql-hackers по дате отправления:

Предыдущее
От: David Steele
Дата:
Сообщение: Re: Race between KeepFileRestoredFromArchive() and restartpoint
Следующее
От: Noah Misch
Дата:
Сообщение: Re: Race between KeepFileRestoredFromArchive() and restartpoint