Re: always use runtime checks for CRC-32C instructions

Поиск
Список
Период
Сортировка
От Nathan Bossart
Тема Re: always use runtime checks for CRC-32C instructions
Дата
Msg-id 20231031033601.GA68409@nathanxps13
обсуждение исходный текст
Ответ на Re: always use runtime checks for CRC-32C instructions  (Jeff Davis <pgsql@j-davis.com>)
Ответы Re: always use runtime checks for CRC-32C instructions  (Nathan Bossart <nathandbossart@gmail.com>)
Список pgsql-hackers
On Mon, Oct 30, 2023 at 01:48:29PM -0700, Jeff Davis wrote:
> I assume you are concerned about the call going through a function
> pointer? If so, is it possible that setting a flag and then branching
> would be better?
> 
> Also, if it's a concern, should we also consider making an inlineable
> version of pg_comp_crc32c_sse42()?

I tested pg_waldump -z with 50M 65-byte records for the following
implementations on an ARM system:

 * slicing-by-8                                : ~3.08s
 * proposed patches applied (runtime check)    : ~2.44s
 * only CRC intrinsics implementation compiled : ~2.42s
 * forced inlining                             : ~2.38s

Avoiding the runtime check produced a 0.8% improvement, and forced inlining
produced another 1.7% improvement.  In comparison, even the runtime check
implementation produced a 20.8% improvement over the slicing-by-8 one.

-- 
Nathan Bossart
Amazon Web Services: https://aws.amazon.com



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

Предыдущее
От: Richard Guo
Дата:
Сообщение: Re: Not deleted mentions of the cleared path
Следующее
От: David Rowley
Дата:
Сообщение: Re: small erreport bug over partitioned table pgrowlocks module