pgsql: Speed up AllocSetFreeIndex, which is a significant cost in palloc - Mailing list pgsql-committers

From tgl@postgresql.org (Tom Lane)
Subject pgsql: Speed up AllocSetFreeIndex, which is a significant cost in palloc
Date
Msg-id 20090721195312.207CA75331E@cvs.postgresql.org
Whole thread Raw
List pgsql-committers
Log Message:
-----------
Speed up AllocSetFreeIndex, which is a significant cost in palloc and pfree,
by using a lookup table instead of a naive shift-and-count loop.  Based on
code originally posted by Sean Eron Anderson at
http://graphics.stanford.edu/%7eseander/bithacks.html.
Greg Stark did the research and benchmarking to show that this is what
we should use.  Jeremy Kerr first noticed that this is a hotspot that
could be optimized, though we ended up not using his suggestion of
platform-specific bit-searching code.

Modified Files:
--------------
    pgsql/src/backend/utils/mmgr:
        aset.c (r1.79 -> r1.80)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/utils/mmgr/aset.c?r1=1.79&r2=1.80)

pgsql-committers by date:

Previous
From: petere@postgresql.org (Peter Eisentraut)
Date:
Subject: pgsql: Remove translated FAQs The English FAQ has been moved to the
Next
From: petere@postgresql.org (Peter Eisentraut)
Date:
Subject: pgsql: Change pg_listener attribute number constants to match the usual