Re: Using POPCNT and other advanced bit manipulation instructions

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Using POPCNT and other advanced bit manipulation instructions
Дата
Msg-id 17612.1550123202@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Using POPCNT and other advanced bit manipulation instructions  (Gavin Flower <GavinFlower@archidevsys.co.nz>)
Список pgsql-hackers
Gavin Flower <GavinFlower@archidevsys.co.nz> writes:
> From my memory of reading of K&R many moons ago, it said that C only 
> guarantees that the lengths are such that
> byte <= half word <= word <= long

Indeed.

> But I don't recall ever seeing a long less than 32 bits!

I'm not sure offhand what C89 said, but C99 requires "short" to be
at least 16 bits, "long" to be at least 32 bits, and "long long"
to be at least 64; see the minimum allowed values for SHRT_MAX etc.

C99 does permit "int" to be only 16 bits, but Postgres doesn't
pretend to work on such an architecture, and nobody's made one
since the (early?) 90s.

            regards, tom lane


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

Предыдущее
От: Gavin Flower
Дата:
Сообщение: Re: Using POPCNT and other advanced bit manipulation instructions
Следующее
От: Andrey Lepikhov
Дата:
Сообщение: Re: WAL insert delay settings