pgsql: Reorder FmgrBuiltin members, saving 25% in size.

From: Andres Freund <andres(at)anarazel(dot)de>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Reorder FmgrBuiltin members, saving 25% in size.
Date: 2018-10-16 21:57:30
Message-ID: E1gCXLG-0006mc-5L@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Reorder FmgrBuiltin members, saving 25% in size.

That's worth it, as fmgr_builtins is frequently accessed, and as
fmgr_builtins is one of the biggest constant variables in a backend.

On most 64bit systems this will change the size of the struct from
32byte to 24bytes. While that could make indexing into the array
marginally more expensive, the higher cache hit ratio is worth more,
especially because these days fmgr_builtins isn't searched with a
binary search anymore (c.f. 212e6f34d5).

Discussion: https://postgr.es/m/20181016201145.aa2dfeq54rhqzron@alap3.anarazel.de

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/28d750c0cd5b3cea0dfbc84cce24e30f5c2eb966

Modified Files
--------------
src/backend/utils/Gen_fmgrtab.pl | 2 +-
src/include/utils/fmgrtab.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message pgsql 2018-10-16 22:02:42 pgsql: Tag refs/tags/REL_11_0 was created
Previous Message Tom Lane 2018-10-16 20:27:45 pgsql: Back off using -isysroot on Darwin.