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

Re: [PATCH v4] Avoid manual shift-and-test logic in AllocSetFreeIndex

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Jeremy Kerr <jk(at)ozlabs(dot)org>
Cc: Greg Stark <gsstark(at)mit(dot)edu>, Stefan Kaltenbrunner <stefan(at)kaltenbrunner(dot)cc>, Robert Haas <robertmhaas(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [PATCH v4] Avoid manual shift-and-test logic in AllocSetFreeIndex
Date: 2009-07-21 14:03:22
Message-ID: 11828.1248185002@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-hackers
Jeremy Kerr <jk(at)ozlabs(dot)org> writes:
> Thanks for the benchmark app, thought I'd pitch in with some ppc 
> results:

It looks to me like we should go with the lookup table approach, as
being the best tradeoff of speed improvement vs platform and compiler
independence.  The "float hack" is right out ;-)

I wonder whether it is worth fooling with alternatives for the data type
of the lookup table entries.  unsigned char might be a tad faster
(avoid useless sign-extension work).  int might be faster yet, but it
would enlarge the table, creating a distributed overhead that the
microbenchmark would completely fail to show.  Or we could buy that
back by reducing the table to cover only 6 bits, knowing that 12 is
more than we need.

			regards, tom lane

In response to

pgsql-hackers by date

Next:From: Tom LaneDate: 2009-07-21 14:06:57
Subject: Re: [PATCH] user mapping extension to pg_ident.conf
Previous:From: Magnus HaganderDate: 2009-07-21 14:01:01
Subject: Re: [PATCH] user mapping extension to pg_ident.conf

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