[COMMITTERS] pgsql: Replace binary search in fmgr_isbuiltin with a lookup array. - Mailing list pgsql-committers

From Andres Freund
Subject [COMMITTERS] pgsql: Replace binary search in fmgr_isbuiltin with a lookup array.
Date
Msg-id E1dze6g-0001Ni-KK@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Replace binary search in fmgr_isbuiltin with a lookup array.

Turns out we have enough functions that the binary search is quite
noticeable in profiles.

Thus have Gen_fmgrtab.pl build a new mapping from a builtin function's
oid to an index in the existing fmgr_builtins array. That keeps the
additional memory usage at a reasonable amount.

Author: Andres Freund, with input from Tom Lane
Discussion: https://postgr.es/m/20170914065128.a5sk7z4xde5uy3ei@alap3.anarazel.de

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/212e6f34d55c910505f87438d878698223d9a617

Modified Files
--------------
src/backend/utils/Gen_fmgrtab.pl | 79 +++++++++++++++++++++++++++++++++-------
src/backend/utils/Makefile       |  2 +-
src/backend/utils/fmgr/fmgr.c    | 29 ++++++---------
src/include/utils/fmgrtab.h      | 11 +++++-
4 files changed, 88 insertions(+), 33 deletions(-)


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

pgsql-committers by date:

Previous
From: Tom Lane
Date:
Subject: [COMMITTERS] pgsql: Adjust git_changelog for new-style release tags.
Next
From: Andres Freund
Date:
Subject: [COMMITTERS] pgsql: Attempt to adapt windows build for 212e6f34d55c.