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

From Tom Lane
Subject Re: [HACKERS] Binary search in fmgr_isbuiltin() is a bottleneck.
Date
Msg-id 9626.1506537620@sss.pgh.pa.us
Whole thread Raw
In response to Re: [HACKERS] Binary search in fmgr_isbuiltin() is a bottleneck.  (Andres Freund <andres@anarazel.de>)
Responses Re: [HACKERS] Binary search in fmgr_isbuiltin() is a bottleneck.
List pgsql-hackers
Andres Freund <andres@anarazel.de> writes:
> On 2017-09-27 13:46:50 -0400, Tom Lane wrote:
>> The other question that ought to be answered is whether a gperf hash
>> table would be faster.

> 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.

Ugh.  I'd never actually used gperf, and now I know why not ;-)

However, that's just the first tool that came to mind.  Wikipedia's
article on perfect hashes links to our man Jenkins:

http://burtleburtle.net/bob/hash/perfect.html

which looks pretty promising.
        regards, tom lane


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

pgsql-hackers by date:

Previous
From: Peter Geoghegan
Date:
Subject: Re: [HACKERS] A design for amcheck heapam verification
Next
From: Andres Freund
Date:
Subject: Re: [HACKERS] Binary search in fmgr_isbuiltin() is a bottleneck.