Обсуждение: pgsql: Optimizations for integer to decimal output.

Поиск
Список
Период
Сортировка

pgsql: Optimizations for integer to decimal output.

От
Andrew Gierth
Дата:
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(-)