Re: use CLZ instruction in AllocSetFreeIndex()

John Naylor <john.naylor@2ndquadrant.com>

From: John Naylor <john.naylor@2ndquadrant.com>
To: David Fetter <david@fetter.org>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, Alvaro Herrera <alvherre@2ndquadrant.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2019-12-28T14:50:24Z
Lists: pgsql-hackers

Attachments

v2 had an Assert that was only correct while experimenting with
eliding right shift. Fixed in v3.

-- 
John Naylor                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Commits

  1. Micro-optimize AllocSetFreeIndex() by reference to pg_bitutils code.

  2. Speed up AllocSetFreeIndex, which is a significant cost in palloc and pfree,