Optimizations for integer to decimal output.
Andrew Gierth <rhodiumtoad@postgresql.org>
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
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/access/common/printsimple.c | modified | +1 −1 |
| src/backend/utils/adt/datetime.c | modified | +49 −49 |
| src/backend/utils/adt/int8.c | modified | +0 −1 |
| src/backend/utils/adt/numutils.c | modified | +231 −174 |
| src/include/utils/builtins.h | modified | +6 −2 |
Discussion
- Efficient output for integer types 23 messages · 2019-09-15 → 2020-01-11