aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/numeric.c
diff options
context:
space:
mode:
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>2016-08-31 16:00:28 +0300
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>2016-08-31 16:00:28 +0300
commit14cca1bf8e31ed39dbc26dd6c610f1113e759972 (patch)
tree489757c243e8ec3564adfe383f494426dc0e16ae /src/backend/utils/adt/numeric.c
parent0e0f43d6fdc2e1fbd5261245ed4cf85302a3f653 (diff)
downloadpostgresql-14cca1bf8e31ed39dbc26dd6c610f1113e759972.tar.gz
postgresql-14cca1bf8e31ed39dbc26dd6c610f1113e759972.zip
Use static inline functions for float <-> Datum conversions.
Now that we are OK with using static inline functions, we can use them to avoid function call overhead of pass-by-val versions of Float4GetDatum, DatumGetFloat8, and Float8GetDatum. Those functions are only a few CPU instructions long, but they could not be written into macros previously, because we need a local union variable for the conversion. I kept the pass-by-ref versions as regular functions. They are very simple too, but they call palloc() anyway, so shaving a few instructions from the function call doesn't seem so important there. Discussion: <dbb82a4a-2c15-ba27-dd0a-009d2aa72b77@iki.fi>
Diffstat (limited to 'src/backend/utils/adt/numeric.c')
0 files changed, 0 insertions, 0 deletions