Faster NUMERIC implementation

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-hackers(at)postgreSQL(dot)org
Subject: Faster NUMERIC implementation
Date: 2003-03-20 03:51:32
Message-ID: 19859.1048132292@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I've been amusing myself the last several evenings by working on a
reimplementation of the NUMERIC datatype, along the lines of previous
discussion (use base-10000 digits instead of base-10 so that the number
of iterations of the inner loops decreases by a factor of about 4).

It's not ready to commit yet, but I've got it passing the regression
tests, and I find that it runs the 'numeric' test about a factor of five
faster than CVS tip; so it seems worth doing. A couple questions for
the group:

1. Has anyone got a problem with changing the on-disk representation of
NUMERIC for 7.4? The only objection I can think of is that it'd prevent
"pg_upgrade" from working ... but we don't have pg_upgrade capability
right now anyway, and I've not heard that anyone is planning to make it
happen for 7.4.

2. The numeric regression test probably isn't a good benchmark for this,
since it spends most of its time pushing around numerics with hundreds of
digits. I doubt that's representative of common usage. Can anyone
offer a more real-world benchmark test?

regards, tom lane

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2003-03-20 03:51:56 Re: Nested transactions: low level stuff
Previous Message Bruce Momjian 2003-03-20 03:42:20 Re: Nested transactions: low level stuff