Re: In PG12, query with float calculations is slower than PG11

From: Emre Hasegeli <emre(at)hasegeli(dot)com>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, nospam-pg-abuse(at)bloodgate(dot)com, Amit Langote <amitlangote09(at)gmail(dot)com>, Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>, keisuke kuroda <keisuke(dot)kuroda(dot)3862(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: In PG12, query with float calculations is slower than PG11
Date: 2020-02-12 19:52:57
Message-ID: CAE2gYzwM6JfoSXthRrL1R2HXafLWXXd=yLVwBq-6p4jk5Htb7A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> > > For most places it'd probably end up being easier to read and to
> > > optimize if we just wrote them as
> > > if (unlikely(isinf(result)) && !isinf(arg))
> > > float_overflow_error();
> > > and when needed added a
> > > else if (unlikely(result == 0) && arg1 != 0.0)
> > > float_underflow_error();
> >
> > +1
>
> Cool. Emre, any chance you could write a patch along those lines?

Yes, I am happy to do. It makes more sense to me too.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Laurenz Albe 2020-02-12 19:55:06 Re: Collation versioning
Previous Message Tom Lane 2020-02-12 19:50:29 Re: In PG12, query with float calculations is slower than PG11