From: | Andres Freund <andres(at)anarazel(dot)de> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Robert Haas <robertmhaas(at)gmail(dot)com>, Jeevan Ladhe <jeevan(dot)ladhe(at)enterprisedb(dot)com>, PostgreSQL Developers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Binary search in fmgr_isbuiltin() is a bottleneck. |
Date: | 2017-09-27 18:31:56 |
Message-ID: | 20170927183156.jqzcsy7ocjcbdnmo@alap3.anarazel.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 2017-09-27 13:46:50 -0400, Tom Lane wrote:
> Andres Freund <andres(at)anarazel(dot)de> writes:
> > I'd been wondering about that too, but I'm not sure I buy that it's
> > worth the effort. The only real argument I see is that there's probably
> > multiple cases where it'd be potentially beneficial, not just here.
>
> The other question that ought to be answered is whether a gperf hash
> table would be faster. In principle it could be because of
> guaranteed-no-collisions, but I have no experience with how fast the
> constructed hash functions might be compared to our regular one.
The patch uses murmurhash32, i.e. a short and fast hash, already for
performance, and it shows up in profiles.
Ugh, hacking together a quick input file for gperf, I'm *far* from
convinced. The generated code does multiple lookups in significantly
sized arrays, and assumes string input. The latter seems like a complete
dealbreaker, and there doesn't seem to be an option to turn it off.
Greetings,
Andres Freund
Attachment | Content-Type | Size |
---|---|---|
fmgrhash.i | text/plain | 12.9 KB |
fmgrhash.c | text/plain | 211.0 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Geoghegan | 2017-09-27 18:32:18 | Re: A design for amcheck heapam verification |
Previous Message | Bossart, Nathan | 2017-09-27 18:11:27 | Re: Use of RangeVar for partitioned tables in autovacuum |