Re: Decimal64 and Decimal128

Поиск
Список
Период
Сортировка
От Feng Tian
Тема Re: Decimal64 and Decimal128
Дата
Msg-id CAFWGqnsAQwngvep5WnT28GyhY_PNLO+XR1-FMJYEHHyh9XTNLw@mail.gmail.com
обсуждение исходный текст
Ответ на Decimal64 and Decimal128  (Feng Tian <ftian@vitessedata.com>)
Ответы Re: Decimal64 and Decimal128  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers


On Thu, Sep 24, 2015 at 1:29 PM, Feng Tian <ftian@vitessedata.com> wrote:
Hi,

Here is an extension for 64 and 128 bit decimal types using IEEE decimal floating point.  The original idea/implementation is from http://pgxn.org/dist/pgdecimal/1.0.0/   Original thread for dicussion is at 


I reimplemented 64/128 bits instead of 32/64 bits.  The code use decNumber library instead of _Decimal64/128 of GCC.   Also added more operators.

Compared to numeric type, decimal64 arithmetics is about 2x faster, decimal128 is about 1.5x faster.  However, the cast between decimal and float4/8 is implemented rather naively and slow.   As always, it depends on workload, decimal may take more, or less space, may be slower if cast is frequently performed.

Agains, thanks to the original author okbob (Pavel).   Enjoy.

Thanks,
Feng


Ah, link.
 
https://github.com/vitesse-ftian/pgdecimal

Thanks,
Feng

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

Предыдущее
От: Feng Tian
Дата:
Сообщение: Decimal64 and Decimal128
Следующее
От: Peter Geoghegan
Дата:
Сообщение: Re: Decimal64 and Decimal128