avoid some calls to memset with array initializer

Поиск
Список
Период
Сортировка
От Justin Pryzby
Тема avoid some calls to memset with array initializer
Дата
Msg-id 20200102163834.GA3183@telsasoft.com
обсуждение исходный текст
Ответы Re: avoid some calls to memset with array initializer
Список pgsql-hackers
Is there any appetite for use of array initializer rather than memset, as in
attached ?  So far, I only looked for "memset.*null", and I can't see that any
of these are hot paths, but saves a cycle or two and a line of code for each.

gcc 4.9.2 with -O2 emits smaller code with array initializer than with inlined
call to memset.

$ wc -l contrib/pageinspect/heapfuncs.S? 
 22159 contrib/pageinspect/heapfuncs.S0
 22011 contrib/pageinspect/heapfuncs.S1

Also true of gcc 5.4.  And 7.3:

 25294 contrib/pageinspect/heapfuncs.S0
 25234 contrib/pageinspect/heapfuncs.S1

Вложения

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

Предыдущее
От: Justin Pryzby
Дата:
Сообщение: Re: error context for vacuum to include block number
Следующее
От: Merlin Moncure
Дата:
Сообщение: Re: Greatest Common Divisor