Re: reducing the footprint of ScanKeyword (was Re: Large writable variables)

Joerg Sonnenberger <joerg@bec.de>

From: Joerg Sonnenberger <joerg@bec.de>
To: David Rowley <david.rowley@2ndquadrant.com>
Cc: John Naylor <jcnaylor@gmail.com>, Joerg Sonnenberger <joerg@bec.de>, Tom Lane <tgl@sss.pgh.pa.us>, Andres Freund <andres@anarazel.de>, PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2019-01-06T14:53:17Z
Lists: pgsql-hackers
On Mon, Jan 07, 2019 at 03:11:55AM +1300, David Rowley wrote:
> What I'm most interested in is how long it took to generate the hash
> function in hash2.c?

It's within the noise floor of time(1) on my laptop, e.g. ~1ms.

Joerg


Commits

  1. Use perfect hashing, instead of binary search, for keyword lookup.

  2. Reduce the size of the fmgr_builtin_oid_index[] array.

  3. Replace the data structure used for keyword lookup.