Speed up conversion of signed integers to C strings.
Robert Haas <rhaas@postgresql.org>
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.
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/utils/adt/int8.c | modified | +3 −5 |
| src/backend/utils/adt/numutils.c | modified | +102 −13 |
| src/include/utils/builtins.h | modified | +1 −0 |
| src/test/regress/expected/int2.out | modified | +13 −0 |
| src/test/regress/expected/int4.out | modified | +13 −0 |
| src/test/regress/expected/int8.out | modified | +13 −0 |
| src/test/regress/sql/int2.sql | modified | +4 −0 |
| src/test/regress/sql/int4.sql | modified | +4 −0 |
| src/test/regress/sql/int8.sql | modified | +4 −0 |