From: Michael Paquier <michael@paquier.xyz>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Improve performance of float overflow checks in btree_gist
Date: Thu, 19 Aug 2021 01:46:03 +0000
Message-ID: <E1mGX87-00062u-PO@gemulon.postgresql.org> (raw)
Improve performance of float overflow checks in btree_gist
The current code could do unnecessary calls to isinf() (two for the
argument values all the time while one could be sufficient in some
cases). zero_is_valid was never used but the result value was still
checked on 0 in the first position of the check.
This is similar to 607f8ce. btree_gist has just copy-pasted the code
doing those checks from the backend float4/8 code, as of the macro
CHECKFLOATVAL(), to do the work.
Author: Haiying Tang
Discussion: https://postgr.es/m/OS0PR01MB611358E3A7BC3C2F874AC36BFBF39@OS0PR01MB6113.jpnprd01.prod.outlook.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/32cf7f7acce3891cbc3de53327704372bdd36d38
Modified Files
--------------
contrib/btree_gist/btree_float4.c | 4 +++-
contrib/btree_gist/btree_float8.c | 8 +++++---
contrib/btree_gist/btree_utils_num.h | 17 -----------------
3 files changed, 8 insertions(+), 21 deletions(-)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: michael@paquier.xyz
Subject: Re: pgsql: Improve performance of float overflow checks in btree_gist
In-Reply-To: <E1mGX87-00062u-PO@gemulon.postgresql.org>
References: <E1mGX87-00062u-PO@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox