Re: [PATCH] backend: compare word-at-a-time in bcTruelen

Поиск
Список
Период
Сортировка
От Jeremy Kerr
Тема Re: [PATCH] backend: compare word-at-a-time in bcTruelen
Дата
Msg-id 200906160951.17386.jk@ozlabs.org
обсуждение исходный текст
Ответ на Re: [PATCH] backend: compare word-at-a-time in bcTruelen  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: [PATCH] backend: compare word-at-a-time in bcTruelen  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
Robert,

> This looks very non-portable to me.

Unsurprisingly, I'm new to postgres hacking and the large number of 
supported platforms :)

I was considering something like:
unsigned int spaces;const unsigned int wordsize = sizeof(unsigned int);
memset(&spaces, ' ', wordsize);

In most cases, the compiler should be able to optimise the memset out, 
but it may introduce overhead where this is not possible.

However, are there any supported platforms where sizeof(unsigned int) != 
4 ?

Cheers,


Jeremy


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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: [PATCH] backend: compare word-at-a-time in bcTruelen
Следующее
От: Stephen Frost
Дата:
Сообщение: Re: [PATCH] backend: compare word-at-a-time in bcTruelen