| From: | Kirill Reshke <reshkekirill(at)gmail(dot)com> |
|---|---|
| To: | Roman Khapov <rkhapov(at)yandex-team(dot)ru> |
| Cc: | PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
| Subject: | Re: Speeding up GIST index creation for hstore |
| Date: | 2026-10-31 17:45:24 |
| Message-ID: | CALdSSPhaQyymP3C41rFApX_mD=UjY-kzxddsQChrRMud+=j6-g@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Sat, 31 Oct 2026 at 21:35, Roman Khapov <rkhapov(at)yandex-team(dot)ru> wrote:
>
> Hi!
>
> Overall the patch looks correct and consistent
> with how intarray, pg_trgm and ltree already
> do it, so I have no objections on the approach.
>
> >
> > Index creating runtime goes from 1454.871- 1488.210 ms to 274.969 -
> > 295.313 ms (about 6 times faster) (4 runs)
> >
>
> I benchmarked the patch too, on my ARM64 maxOS
> machine I got next results:
>
> baseline patched
> CREATE INDEX ~392 ms ~233 ms (1.7x)
>
> Index search shows no regressions (within noise).
>
> Seems like the 6x number appears to be machine-dependent,
> on my laptop the absolute time of the patched version similar
> yours (~233 vs ~275-295 ms), but the baseline was 390ms rather
> than 1450 ms, giving ~1.6-1.7x instead of 6x.
>
> --
> Best regards,
> Roman Khapov
Looks very platform-dependent for me,
On AMD EPYC Genoa :
compiler | timing | speed up
GCC 12.4 | 1778 → 279 | 6,35
GCC 13.3 | 1464 → 283 | 5,17
GCC 14.2 | 1350 → 277 | 4,87
Clang 16.0 | 865 → 263 | 3,29
Clang 18.1 | 756 → 265 | 2,85
Clang 19.1 | 760 → 263 | 2,89
On my Mac M4 it takes 257 -> 170 ms
--
Best regards,
Kirill Reshke
| From | Date | Subject | |
|---|---|---|---|
| Previous Message | Roman Khapov | 2026-10-31 17:37:07 | pgbench aggregates final part can be missed at log |