Re: Optimize Arm64 crc32c implementation in Postgresql

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Optimize Arm64 crc32c implementation in Postgresql
Дата
Msg-id 17188.1525271439@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Optimize Arm64 crc32c implementation in Postgresql  (Thomas Munro <thomas.munro@enterprisedb.com>)
Ответы Re: Optimize Arm64 crc32c implementation in Postgresql  (Thomas Munro <thomas.munro@enterprisedb.com>)
Список pgsql-hackers
Thomas Munro <thomas.munro@enterprisedb.com> writes:
> Ahh, OpenSSL's armcap.c shows how to do this.  You need to
> siglongjmp() out of there.  Here's a patch that does it that way.
> Isn't this better?

Do you really need the pg_crc32c_armv8_choose_dummy global variable?
That seems pretty ugly.  If you're concerned about the compiler
optimizing away the call to the crc function, you could write it like

    result = (pg_comp_crc32c_armv8(0, 0, 0) == expected-value);

which'd provide a bit of extra checking that the code's not broken,
too.

            regards, tom lane


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

Предыдущее
От: Heikki Linnakangas
Дата:
Сообщение: Re: BufFileSize() doesn't work on a "shared" BufFiles
Следующее
От: Tom Lane
Дата:
Сообщение: Re: power() function in Windows: "value out of range: underflow"