pgsql: Speed up conversion of signed integers to C strings.

From: Robert Haas <rhaas(at)postgresql(dot)org>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Speed up conversion of signed integers to C strings.
Date: 2010-11-20 03:15:41
Message-ID: E1PJdvR-0001kd-Dn@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Speed up conversion of signed integers to C strings.

A hand-coded implementation turns out to be much faster than calling
printf(). In passing, add a few more regresion tests.

Andres Freund, with assorted, mostly cosmetic changes.

Branch
------
master

Details
-------
http://git.postgresql.org/gitweb?p=postgresql.git;a=commitdiff;h=4fc115b2e981f8c63165ca86a23215380a3fda66

Modified Files
--------------
src/backend/utils/adt/int8.c | 8 +--
src/backend/utils/adt/numutils.c | 115 ++++++++++++++++++++++++++++++++----
src/include/utils/builtins.h | 1 +
src/test/regress/expected/int2.out | 13 ++++
src/test/regress/expected/int4.out | 13 ++++
src/test/regress/expected/int8.out | 13 ++++
src/test/regress/sql/int2.sql | 4 +
src/test/regress/sql/int4.sql | 4 +
src/test/regress/sql/int8.sql | 4 +
9 files changed, 157 insertions(+), 18 deletions(-)

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2010-11-20 03:30:00 pgsql: Fix leakage of cost_limit when multiple autovacuum workers are a
Previous Message User Hinoue 2010-11-20 02:07:10 psqlodbc - psqlodbc: Initialize flags member in QResultClass before