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

2009-07-19 Thread Tom Lane
Jeremy Kerr writes: >>> - inline is forbidden to use in PostgreSQL - you need exception or >>> do it differently > (inline again: should I just make this a static, the compiler can inline > where possible? or do you want a macro?) I don't know where Zdenek got the idea that we have something ag

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

2009-07-19 Thread Jeremy Kerr
Hi Robert, > That having been said, Jeremy, you probably want to take a look at > those comments and I have a few responses to them as well. OK, thanks for the heads-up. > following comment: > > Applied and built cleanly. Regress passes. Trying to hunt down ppc > > box to see if performance enha

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

2009-07-19 Thread Stefan Kaltenbrunner
Robert Haas wrote: On Tue, Jun 30, 2009 at 3:08 AM, Jeremy Kerr wrote: Move the shift-and-test login into a separate fls() function, which can use __builtin_clz() if it's available. This requires a new check for __builtin_clz in the configure script. Results in a ~2% performance increase on Po

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

2009-07-19 Thread Robert Haas
On Tue, Jun 30, 2009 at 3:08 AM, Jeremy Kerr wrote: > Move the shift-and-test login into a separate fls() function, which > can use __builtin_clz() if it's available. > > This requires a new check for __builtin_clz in the configure script. > > Results in a ~2% performance increase on PowerPC. Ther

[HACKERS] [PATCH v3] Avoid manual shift-and-test logic in AllocSetFreeIndex

2009-06-30 Thread Jeremy Kerr
Move the shift-and-test login into a separate fls() function, which can use __builtin_clz() if it's available. This requires a new check for __builtin_clz in the configure script. Results in a ~2% performance increase on PowerPC. Signed-off-by: Jeremy Kerr --- v3: respin as context diff ---