Re: faster version of AllocSetFreeIndex for x86 architecture

From: Jeremy Kerr <jk(at)ozlabs(dot)org>
To: pgsql-hackers(at)postgresql(dot)org
Cc: Atsushi Ogawa <a_ogawa(at)hi-ho(dot)ne(dot)jp>
Subject: Re: faster version of AllocSetFreeIndex for x86 architecture
Date: 2009-06-02 15:39:52
Message-ID: 200906030139.52998.jk@ozlabs.org
Views: Raw Message | Whole Thread | Download mbox
Thread:
Lists: pgsql-hackers

Hi,

> I made a faster version of AllocSetFreeIndex for x86 architecture.

Neat, I have a version for PowerPC too.

In order to prevent writing multiple copies of AllocSetFreeIndex, I
propose that we add a fls() function ("find last set"); this can be
defined in an architecture-independent manner (ie, shift mask & test in
a loop), and re-defined for arches that have faster ways of doing the
same (ie, cntlz instruction on powerpc).

We can then change AllocSetFreeIndex to use fls().

Patches coming...

Jeremy

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2009-06-02 15:43:48 Managing multiple branches in git
Previous Message Marko Kreen 2009-06-02 15:34:49 Re: PostgreSQL Developer meeting minutes up