Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bf3r1-0008Ci-Dr for pgsql-hackers@arkaria.postgresql.org; Wed, 31 Aug 2016 11:38:51 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bf3r0-0003wF-Pw for pgsql-hackers@arkaria.postgresql.org; Wed, 31 Aug 2016 11:38:50 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bf3qz-0003ve-Cw for pgsql-hackers@postgresql.org; Wed, 31 Aug 2016 11:38:49 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bf3qw-0003jH-VW for pgsql-hackers@postgresql.org; Wed, 31 Aug 2016 11:38:48 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id u7VBcYOm006356; Wed, 31 Aug 2016 07:38:34 -0400 From: Tom Lane To: Heikki Linnakangas cc: pgsql-hackers Subject: Re: Use static inline functions for Float <-> Datum conversions In-reply-to: References: Comments: In-reply-to Heikki Linnakangas message dated "Wed, 31 Aug 2016 13:48:29 +0300" Date: Wed, 31 Aug 2016 07:38:34 -0400 Message-ID: <6355.1472643514@sss.pgh.pa.us> X-Pg-Spam-Score: -3.4 (---) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org Heikki Linnakangas 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 -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers