Re: [HACKERS] Binary search in fmgr_isbuiltin() is a bottleneck. - Mailing list pgsql-hackers

From Andres Freund
Subject Re: [HACKERS] Binary search in fmgr_isbuiltin() is a bottleneck.
Date
Msg-id 20170927183156.jqzcsy7ocjcbdnmo@alap3.anarazel.de
Whole thread Raw
In response to Re: [HACKERS] Binary search in fmgr_isbuiltin() is a bottleneck.  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: [HACKERS] Binary search in fmgr_isbuiltin() is a bottleneck.
List pgsql-hackers
On 2017-09-27 13:46:50 -0400, Tom Lane wrote:
> Andres Freund <andres@anarazel.de> writes:
> > I'd been wondering about that too, but I'm not sure I buy that it's
> > worth the effort. The only real argument I see is that there's probably
> > multiple cases where it'd be potentially beneficial, not just here.
> 
> The other question that ought to be answered is whether a gperf hash
> table would be faster.  In principle it could be because of
> guaranteed-no-collisions, but I have no experience with how fast the
> constructed hash functions might be compared to our regular one.

The patch uses murmurhash32, i.e. a short and fast hash, already for
performance, and it shows up in profiles.

Ugh, hacking together a quick input file for gperf, I'm *far* from
convinced. The generated code does multiple lookups in significantly
sized arrays, and assumes string input. The latter seems like a complete
dealbreaker, and there doesn't seem to be an option to turn it off.

Greetings,

Andres Freund

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Attachment

pgsql-hackers by date:

Previous
From: "Bossart, Nathan"
Date:
Subject: Re: [HACKERS] Use of RangeVar for partitioned tables in autovacuum
Next
From: Peter Geoghegan
Date:
Subject: Re: [HACKERS] A design for amcheck heapam verification