Optimizations for integer to decimal output.
authorAndrew Gierth <[email protected]>
Sat, 1 Feb 2020 21:57:14 +0000 (21:57 +0000)
committerAndrew Gierth <[email protected]>
Sat, 1 Feb 2020 21:57:14 +0000 (21:57 +0000)
commit1fd687a035558238c0e3cab09fc22dc61a088869
treea1bb4aeffc21f7fc0e96f7d86d0b80c5c3b0ab8c
parent7bae0ad9fcb76b28410571dc71edfdc3175c4a02
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
src/backend/access/common/printsimple.c
src/backend/utils/adt/datetime.c
src/backend/utils/adt/int8.c
src/backend/utils/adt/numutils.c
src/include/utils/builtins.h