Re: Use static inline functions for Float <-> Datum conversions

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Use static inline functions for Float <-> Datum conversions
Date: 2016-08-31 11:38:34
Message-ID: 6355.1472643514@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Heikki Linnakangas <hlinnaka(at)iki(dot)fi> writes:
> Now that we are OK with static inline functions, we can save some cycles
> from floating-point functions, by turning Float4GetDatum,
> Float8GetDatum, and DatumGetFloat8 into static inlines.

Looks good to me.

I wonder whether there is a compiler-dependent way of avoiding the union
trick ... or maybe gcc is already smart enough that it doesn't matter?

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Heikki Linnakangas 2016-08-31 12:22:30 Re: Use static inline functions for Float <-> Datum conversions
Previous Message Tom Lane 2016-08-31 11:32:11 Re: GIN logging GIN_SEGMENT_UNMODIFIED actions?