From: | Andres Freund <andres(at)anarazel(dot)de> |
---|---|
To: | pgsql-committers(at)postgresql(dot)org |
Subject: | pgsql: Replace binary search in fmgr_isbuiltin with a lookup array. |
Date: | 2017-10-04 07:28:38 |
Message-ID: | E1dze6g-0001Ni-KK@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera | 2017-10-04 09:40:57 | Re: [COMMITTERS] pgsql: Fix freezing of a dead HOT-updated tuple |
Previous Message | Tom Lane | 2017-10-04 04:45:20 | pgsql: Adjust git_changelog for new-style release tags. |