Re: New CRC algorithm: Slicing by 8

Поиск
Список
Период
Сортировка
От Jeremy Drake
Тема Re: New CRC algorithm: Slicing by 8
Дата
Msg-id Pine.BSO.4.64.0610231212560.5201@resin.csoft.net
обсуждение исходный текст
Ответ на Re: New CRC algorithm: Slicing by 8  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: New CRC algorithm: Slicing by 8  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Mon, 23 Oct 2006, Tom Lane wrote:

> Jeremy Drake <pgsql@jdrake.com> writes:
> > So at this point I realize that intel's compiler is optimizing the loop
> > away, at least for the std crc and probably for both.  So I make mycrc an
> > array of 2, and substript mycrc[j&1] in the loop.
>
> That's not a good workaround, because making mycrc expensive to access
> means your inner loop timing isn't credible at all.  Instead try making the
> buffer array nonlocal --- malloc it, perhaps.

That did not make any difference.  The way I see it, the only way to
convince the compiler it really needs to do this loop more than once is to
make it think it is not overwriting the same variable every time.  The
subscript was the cheapest way I could think of to do that.  Any other
suggestions on how to do this are welcome.

>
>             regards, tom lane
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: explain analyze is your friend
>
>

-- 
I like being single.  I'm always there when I need me.    -- Art Leo


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: New CRC algorithm: Slicing by 8
Следующее
От: Tom Lane
Дата:
Сообщение: Re: New CRC algorithm: Slicing by 8