GiST "choose subtree" support function to inline penalty - Mailing list pgsql-hackers

From Darafei "Komяpa" Praliaskouski
Subject GiST "choose subtree" support function to inline penalty
Date
Msg-id CAC8Q8t+wyQexv_3H=LG8PVQTAg14MBFoOqChpNmYNLPUQe-6aw@mail.gmail.com
Whole thread Raw
Responses Re: GiST "choose subtree" support function to inline penalty
Re: GiST "choose subtree" support function to inline penalty
List pgsql-hackers
Hi,

I'm looking at PostGIS geometry GiST index build times and try to optimize withing the current GiST framework. The function that shows a lot on my flame graphs is penalty. 

I spent weekend rewriting PostGIS penalty to be as fast as possible. 
(FYI https://github.com/postgis/postgis/pull/425/files

However I cannot get any meaningfully faster build time. Even when I strip it to "just return edge extension" index build time is the same.

Is there a way to inline the penalty into above "choose subtree" loop somehow? That would also let us stop bit-fiddling floats to simulate a more complex choosing scheme.

--
Darafei Praliaskouski

pgsql-hackers by date:

Previous
From: ilmari@ilmari.org (Dagfinn Ilmari Mannsåker)
Date:
Subject: Re: using explicit_bzero
Next
From: Michael Paquier
Date:
Subject: Re: Custom table AMs need to include heapam.h because ofBulkInsertState