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 10360.1506538716@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.  (Andres Freund <andres@anarazel.de>)
List pgsql-hackers
Andres Freund <andres@anarazel.de> writes:
> Honestly before going there I'd rather just have
> an oid indexed array, computed at compile time.

Yeah, I'd been kind of wondering about that approach too.  We could have,
say, a table of int16s indexed by OIDs from 0 to 9999, containing zero or
an index into the table of FmgrBuiltin structs.  So 20000 bytes of
constant data, and O(negligible) lookup time other than possible cache
misses on this table.  But a dynahash-ish hash table built for 2800+
entries would probably be about that size ...
        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: Andres Freund
Date:
Subject: Re: [HACKERS] list of credits for release notes
Next
From: Andres Freund
Date:
Subject: Re: [HACKERS] Binary search in fmgr_isbuiltin() is a bottleneck.