pgsql: Optimizations for integer to decimal output.

From: Andrew Gierth <rhodiumtoad(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Optimizations for integer to decimal output.
Date: 2020-02-01 22:04:36
Message-ID: E1iy0sW-0002EU-O6@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Optimizations for integer to decimal output.

Using a lookup table of digit pairs reduces the number of divisions
needed, and calculating the length upfront saves some work; these
ideas are taken from the code previously committed for floats.

David Fetter, reviewed by Kyotaro Horiguchi, Tels, and me.

Discussion: https://postgr.es/m/20190924052620.GP31596%40fetter.org

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/1fd687a035558238c0e3cab09fc22dc61a088869

Modified Files
--------------
src/backend/access/common/printsimple.c | 2 +-
src/backend/utils/adt/datetime.c | 98 ++++----
src/backend/utils/adt/int8.c | 1 -
src/backend/utils/adt/numutils.c | 405 ++++++++++++++++++--------------
src/include/utils/builtins.h | 8 +-
5 files changed, 287 insertions(+), 227 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2020-02-02 18:09:41 pgsql: Fix assorted error-cleanup bugs in SSL min/max protocol version
Previous Message Thomas Munro 2020-02-01 10:03:37 Re: pgsql: Fix memory leak on DSM slot exhaustion.