aboutsummaryrefslogtreecommitdiff
path: root/src/backend/commands/async.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2009-07-21 19:53:12 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2009-07-21 19:53:12 +0000
commitab5b4e2f9ede250bd77d09aa8ec60bfeb982fb01 (patch)
tree4ca18782a0d367a3b9ae96ed3d1927843bafd60c /src/backend/commands/async.c
parentf3f45c87d23b800913fb8ea88fe2d713f6b9dd74 (diff)
downloadpostgresql-ab5b4e2f9ede250bd77d09aa8ec60bfeb982fb01.tar.gz
postgresql-ab5b4e2f9ede250bd77d09aa8ec60bfeb982fb01.zip
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.
Diffstat (limited to 'src/backend/commands/async.c')
0 files changed, 0 insertions, 0 deletions