Re: Optimize Arm64 crc32 implementation in PostgreSQL

Поиск
Список
Период
Сортировка
От Nathan Bossart
Тема Re: Optimize Arm64 crc32 implementation in PostgreSQL
Дата
Msg-id 20230821200446.GA444673@nathanxps13
обсуждение исходный текст
Ответ на Optimize Arm64 crc32 implementation in PostgreSQL  (Xiang Gao <Xiang.Gao@arm.com>)
Список pgsql-hackers
On Mon, Aug 21, 2023 at 09:32:42AM +0000, Xiang Gao wrote:
> Currently PostgreSQL has three different variants of a 32-bit CRC calculation: CRC-32C, CRC-32(Ethernet polynomial),
> and a legacy CRC-32 version that uses the lookup table. Some ARMv8 (AArch64) CPUs implement the CRC32 extension
which
> is equivalent with CRC-32(Ethernet polynomial), so they can also benefit from hardware acceleration.
> 
> Can I propose a patch to optimize crc32 calculation with Arm64 specific instructions?

We have support for ARMv8 CRC instructions for CRC-32C (see
src/port/pg_crc32c_armv8.c), but AFAICT Postgres has no such optimization
for CRC-32.  The CRC-32 macros have a comment indicating that they are
currently only used in ltree and hstore, so there might not be terribly
much demand for hardware acceleration, though.

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



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

Предыдущее
От: Jeff Davis
Дата:
Сообщение: Re: CREATE FUNCTION ... SEARCH { DEFAULT | SYSTEM | SESSION }
Следующее
От: Joe Conway
Дата:
Сообщение: Re: C function to return double precision[][]