Faster NUMERIC implementation - Mailing list pgsql-hackers

From Tom Lane
Subject Faster NUMERIC implementation
Date
Msg-id 19859.1048132292@sss.pgh.pa.us
Whole thread Raw
Responses Re: Faster NUMERIC implementation  (Bruce Momjian <pgman@candle.pha.pa.us>)
Re: Faster NUMERIC implementation  (Michael Meskes <meskes@postgresql.org>)
List 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


pgsql-hackers by date:

Previous
From: Hiroshi Inoue
Date:
Subject: Re: Nested transactions: low level stuff
Next
From: Bruce Momjian
Date:
Subject: Re: Nested transactions: low level stuff