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

From Andrew Borodin
Subject Re: GiST penalty functions [PoC]
Date
Msg-id CAJEAwVFz0bVB3r2FVCM+HGyGEdHsRrN-uGw-V28kzminGdiWQw@mail.gmail.com
Whole thread Raw
In response to GiST penalty functions [PoC]  (Andrew Borodin <borodin@octonica.com>)
Responses Re: GiST penalty functions [PoC]  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Hi hackers!

Here is the new patch version.
With the help of Mikhail Bakhterev I've optimized subroutines of the
penalty function. Index build time now is roughly equivalent to build
time before patch (test attached to thread start).
Time of SELECT statement execution is reduced by 40%.
Changes in the patch:
1. Wrong usage of realms is fixed
2. Cube size and margin (edge) functions are optimized to reduce
memory write instructions count (result of these functions were
written on evey cycle of a loop)
3. All private functions are marked as static inline
4. Comments are formatted per project style

I'm going to put this to commitfest queue, because performance of gist
queries is improved significantly and I do not see any serious
drawbacks.

Any ideas about this patch are welcome. Especialy I'm conserned about
portability of pack_float function.
Does every supported Postgres platform conforms to IEEE 754 floating
point specification?

Also I'm not sure about possibility to hit any problems with float
NaNs during float package?

Best regards, Andrey Borodin, Octonica & Ural Federal University.

Attachment

pgsql-hackers by date:

Previous
From: Pavel Stehule
Date:
Subject: new gcc warning
Next
From: Robert Haas
Date:
Subject: Re: Add support for restrictive RLS policies