Re: [PATCH v4] Avoid manual shift-and-test logic in AllocSetFreeIndex - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [PATCH v4] Avoid manual shift-and-test logic in AllocSetFreeIndex
Date
Msg-id 18739.1248206398@sss.pgh.pa.us
Whole thread Raw
In response to [PATCH v4] Avoid manual shift-and-test logic in AllocSetFreeIndex  (Jeremy Kerr <jk@ozlabs.org>)
List pgsql-hackers
Jeremy Kerr <jk@ozlabs.org> writes:
> Rather than testing single bits in a loop, change AllocSetFreeIndex to
> use the __builtin_clz() function to calculate the chunk index.

Per subsequent discussion and testing, I've committed a patch that
uses a lookup table instead of depending on __builtin_clz().
http://archives.postgresql.org/message-id/20090721195312.207CA75331E@cvs.postgresql.org
        regards, tom lane


pgsql-hackers by date:

Previous
From: "Dickson S. Guedes"
Date:
Subject: Re: WIP patch for TODO Item: Add prompt escape to display the client and server versions
Next
From: Tom Lane
Date:
Subject: Re: psql \du and \dg is the same - pg 8.4