Skip site navigation (1) Skip section navigation (2)

Re: equal() perf tweak

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Neil Conway <neilc(at)samurai(dot)com>
Cc: PostgreSQL Patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: equal() perf tweak
Date: 2003-11-03 23:19:29
Message-ID: 13039.1067901569@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-patches
Neil Conway <neilc(at)samurai(dot)com> writes:
> Do you think it would be worth the trouble to use both algorithms, and
> then test on the node tag of the first element to decide which one to
> use? (The assumption being lists are homogeneous).

Hard to tell.  Since I haven't seen any evidence that equal() on lists
is a particular hotspot, I'd lean against adding complexity and
maintenance burden here.

> One thing I've been wondering about is whether it would be worth ripping
> out the existing List code wholesale, and replacing it with something
> like the following:

I have already done something much like this in a few hotspots using the
FastList structure.  But notationally, it's a pain in the neck compared
to the existing List code.  If you can think of a way to implement this
without adding a lot of notational cruft, I'd sure be for it.  I'm not
for it if it imposes as much messiness as the FastList approach does...

			regards, tom lane

In response to

Responses

pgsql-hackers by date

Next:From: Tom LaneDate: 2003-11-03 23:38:01
Subject: Re: adding support for posix_fadvise()
Previous:From: Gaetano MendolaDate: 2003-11-03 23:17:29
Subject: Re: 7.4RC1 tag'd, branched and bundled ...

pgsql-patches by date

Next:From: Tom LaneDate: 2003-11-03 23:46:12
Subject: Re: bufmgr code cleanup
Previous:From: Larry RosenmanDate: 2003-11-03 23:09:38
Subject: Re: UW 713UP3 patch

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group