Re: New version of money type

From: "D'Arcy J(dot)M(dot) Cain" <darcy(at)druid(dot)net>
To: andrew(at)supernews(dot)com
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: New version of money type
Date: 2006-09-15 15:47:05
Message-ID: 20060915114705.b984ef22.darcy@druid.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, 15 Sep 2006 15:14:10 -0000
Andrew - Supernews <andrew+nonews(at)supernews(dot)com> wrote:
> On 2006-09-15, "D'Arcy J.M. Cain" <darcy(at)druid(dot)net> wrote:
> > On Fri, 15 Sep 2006 10:17:55 -0000
> > Andrew - Supernews <andrew+nonews(at)supernews(dot)com> wrote:
> >> Presumably the same speed as bigint, which is to say that while it is
> >> faster than numeric for calculation, it is (much) slower for input/output.
> >> (The difference in speed between bigint output and numeric output is
> >> measured in multiples, not in percentages.)
> >
> > I/O for money seems at least as compareable to numeric if not slightly
> > better.
>
> Seems? Have you benchmarked it?

Not rigourously but a few "ANALYZE EXPLAIN" statements bear out this
observation.

> The point is that bigint is _not_ faster than numeric for I/O (in fact
> even integer is not faster than numeric for output).
>
> Numbers from an actual benchmark:
>
> int4out(0) - 0.42us/call
> numeric_out(0) - 0.32us/call
>
> int4out(1000000000) - 0.67us/call
> numeric_out(1000000000) - 0.42us/call

Whay benchmark is this? Perhaps I can modify it to include my new
implementation.

--
D'Arcy J.M. Cain <darcy(at)druid(dot)net> | Democracy is three wolves
http://www.druid.net/darcy/ | and a sheep voting on
+1 416 425 1212 (DoD#0082) (eNTP) | what's for dinner.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Martijn van Oosterhout 2006-09-15 15:54:22 Re: polite request about syntax
Previous Message Gregory Stark 2006-09-15 15:44:53 confusing comment in tqual.c