Re: autovectorize page checksum code included elsewhere

Поиск
Список
Период
Сортировка
От Nathan Bossart
Тема Re: autovectorize page checksum code included elsewhere
Дата
Msg-id 20231123165109.GA3889227@nathanxps13
обсуждение исходный текст
Ответ на Re: autovectorize page checksum code included elsewhere  (John Naylor <johncnaylorls@gmail.com>)
Ответы Re: autovectorize page checksum code included elsewhere  (John Naylor <johncnaylorls@gmail.com>)
Список pgsql-hackers
On Thu, Nov 23, 2023 at 05:50:48PM +0700, John Naylor wrote:
> On Thu, Nov 23, 2023 at 1:49 AM Nathan Bossart <nathandbossart@gmail.com> wrote:
>> One half-formed idea I have is to introduce some sort of ./configure flag
>> that enables all the newer instructions that your CPU understands.
> 
> That's not doable,

It's not?

> but we should consider taking advantage of
> x86-64-v2, which RedHat 9 builds with. That would allow inlining CRC
> and popcount there.

Maybe we have something like --with-isa-level where you can specify
x86-64-v[1-4] or "auto" to mean "build whatever the current machine can
handle."  I can imagine packagers requiring v2 these days (it's probably
worth asking them), and that would not only allow compiling in SSE 4.2 on
many more machines, but it would also open up a path to supporting
AVX2/AVX512 and beyond.

> Not sure how to detect that easily.

I briefly looked around and didn't see a portable way to do so.  We might
have to exhaustively check the features, which doesn't seem like it'd be
too bad for x86_64, but I haven't looked too closely at other
architectures.

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



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

Предыдущее
От: Tomas Vondra
Дата:
Сообщение: Re: undetected deadlock in ALTER SUBSCRIPTION ... REFRESH PUBLICATION
Следующее
От: Matthias van de Meent
Дата:
Сообщение: Questions regarding Index AMs and natural ordering