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 20170927191116.ujssdts6cenjuznm@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
Hi,

On 2017-09-27 15:06:15 -0400, Tom Lane wrote:
> Yeah, constructing an index table of that sort on top of the existing
> FmgrBuiltin array could be done cheaply enough at startup.  It irks me
> slightly that it's not part of the read-only text segment, but I can't
> say that there's any really measurable impact.

I don't think this case is significant enough to make it worthwhile, but
if we'd find one that is, we certainly could add code that builds the
hash's array once in memory, then serializes that into a .h file, which
then is included into the code.   I can't immediately see more of these
coming up, but who knows?

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

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [HACKERS] Binary search in fmgr_isbuiltin() is a bottleneck.
Next
From: Robert Haas
Date:
Subject: Re: [HACKERS] Binary search in fmgr_isbuiltin() is a bottleneck.