Re: GiST penalty functions [PoC]

Поиск
Список
Период
Сортировка
От Михаил Бахтерев
Тема Re: GiST penalty functions [PoC]
Дата
Msg-id 20160909064140.GA2506@kite
обсуждение исходный текст
Ответ на Re: GiST penalty functions [PoC]  (Andrey Borodin <borodin@octonica.com>)
Список pgsql-hackers
Yes. You are right, ANSI C allows only load-time initializers. Attached
ANSI compatible version leads to the same assembly.

And let me suggest a bit-twiddling version as well. It gives 12
instructions, instead of 13. 12 is better, as modern x86 CPU will fetch
them at most in 3 cycles, one less than for 13 instructions. Also this
bit-twiddling is more parallel at instruction level.

And for ARM, which is unsurpassed at bit-twiddling this code is a way
better.

Of course speed is influenced by a lot of factors as always, so it needs
to be tested on some datasets.

- Mikhail, respectfully

On Fri, Sep 09, 2016 at 08:50:53AM +0500, Andrey Borodin wrote:
> Thank you for your attention to details, Mikhail.
>
> pack_float_good() looks good. But I'm not sure inline strict init is allowed under ansi C. Converting to regular
ancientform b.fp = v; won't change compile result, would it? 
>
> Regards, Andrey Borodin.

Вложения

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

Предыдущее
От: Михаил Бахтерев
Дата:
Сообщение: Re: GiST penalty functions [PoC]
Следующее
От: Heikki Linnakangas
Дата:
Сообщение: Re: Tuplesort merge pre-reading