Re: Efficient output for integer types

Поиск
Список
Период
Сортировка
От Andrey Borodin
Тема Re: Efficient output for integer types
Дата
Msg-id E024B828-A33F-451A-AFE0-F1C98A4F8F7C@yandex-team.ru
обсуждение исходный текст
Ответ на Efficient output for integer types  (David Fetter <david@fetter.org>)
Ответы Re: Efficient output for integer types  (David Fetter <david@fetter.org>)
Список pgsql-hackers

> 15 сент. 2019 г., в 12:18, David Fetter <david@fetter.org> написал(а):
>
> Please find attached a couple of patches intended to $subject.
>
> This patch set cut the time to copy ten million rows of randomly sized
> int8s (10 of them) by about a third, so at least for that case, it's
> pretty decent.

Hi! Looks cool.

Just curious if for any fixed base and square here

+        while(uvalue >= base)
         {
+            const int i = (uvalue % square) * 2;
+            uvalue /= square;
+            vallen += 2;
+            memcpy(convert + sizeof(convert) - vallen, digits + i, 2);
+        }

compiler will have a chance to avoid idiv instruction?
Maybe few specialized functions could work better than generic algorithm?

Best regards, Andrey Borodin.


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

Предыдущее
От: David Fetter
Дата:
Сообщение: Efficient output for integer types
Следующее
От: Dean Rasheed
Дата:
Сообщение: Re: BF failure: could not open relation with OID XXXX while querying pg_views