Re: GiST penalty functions [PoC] - Mailing list pgsql-hackers

From Михаил Бахтерев
Subject Re: GiST penalty functions [PoC]
Date
Msg-id 20160908211051.GA1449@kite
Whole thread Raw
In response to Re: GiST penalty functions [PoC]  (Andrew Borodin <borodin@octonica.com>)
List pgsql-hackers
If you are still interested in. Here are 3 versions of pack-float. The
union version of pack-float should run faster. The code is simpler, the
dependencies are easier.

But it may be less accurate or even wrong, as for signed integers (x>>2)
and (x/4) are not the same. Consider x = -1.

You may try pack_float_good, which gives the same asm as v3, but without
warnings.

- Mikhail, respectfully

On Thu, Sep 08, 2016 at 01:29:36PM +0500, Andrew Borodin wrote:
> >autoconf check for IEEE 754 floats
> Autoconf man says folowing:
> >it is safe to assume IEEE-754 in most portable code these days
> https://www.gnu.org/software/autoconf/manual/autoconf.html#Floating-Point-Portability
>
> > A union might be more readable
> Here is union version of the patch. It's slower 10% than original cube
> and dereference version. Have no idea why.
> Select performance is improved as in v3.
>

Attachment

pgsql-hackers by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: patch: function xmltable
Next
From: Михаил Бахтерев
Date:
Subject: Re: GiST penalty functions [PoC]