Re: [POC] verifying UTF-8 using SIMD instructions

Поиск
Список
Период
Сортировка
От Heikki Linnakangas
Тема Re: [POC] verifying UTF-8 using SIMD instructions
Дата
Msg-id 8b5d6e4b-2478-38d1-8b3e-ce5132e3ce4c@iki.fi
обсуждение исходный текст
Ответ на Re: [POC] verifying UTF-8 using SIMD instructions  (John Naylor <john.naylor@enterprisedb.com>)
Ответы Re: [POC] verifying UTF-8 using SIMD instructions
Список pgsql-hackers
On 09/02/2021 22:08, John Naylor wrote:
> Maybe there's a smarter way to check for zeros in C. Or maybe be more 
> careful about cache -- running memchr() on the whole input first might 
> not be the best thing to do.

The usual trick is the haszero() macro here: 
https://graphics.stanford.edu/~seander/bithacks.html#ZeroInWord. That's 
how memchr() is typically implemented, too.

- Heikki



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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: [HACKERS] Custom compression methods
Следующее
От: Robert Haas
Дата:
Сообщение: Re: Is txid_status() actually safe? / What is 011_crash_recovery.pl testing?