postgresql/src
Tom Lane 0ce38730ac Micro-optimize AllocSetFreeIndex() by reference to pg_bitutils code.
Use __builtin_clz() where available.  Where it isn't, we can still win
a little by using the pg_leftmost_one_pos[] lookup table instead of
having a private table.

Also drop the initial right shift by ALLOC_MINBITS in favor of
subtracting ALLOC_MINBITS from the leftmost-one-pos result.  This
is a win because the compiler can fold that adjustment into other
constants it'd have to add anyway, making the shift-removal free.

Also, we can explain this coding as an unrolled form of
pg_leftmost_one_pos32(), even though that's a bit ahistorical
since it long predates pg_bitutils.h.

John Naylor, with some cosmetic adjustments by me

Discussion: https://postgr.es/m/CACPNZCuNUGMxjK7WTn_=WZnRbfASDdBxmjsVf2+m9MdmeNw_sg@mail.gmail.com
2019-12-28 17:21:17 -05:00
..
backend Micro-optimize AllocSetFreeIndex() by reference to pg_bitutils code. 2019-12-28 17:21:17 -05:00
bin Add pg_dump test for triggers on partitioned tables 2019-12-27 18:34:30 -03:00
common Fix output of Unicode normalization test 2019-12-11 08:42:17 +01:00
fe_utils Fix query cancellation handling in psql 2019-12-17 10:44:25 +09:00
include Revert "Rename files and headers related to index AM" 2019-12-27 08:09:00 +09:00
interfaces libpq should expose GSS-related parameters even when not implemented. 2019-12-20 15:34:07 -05:00
makefiles Select CFLAGS_SL at configure time, not in platform-specific Makefiles. 2019-10-21 12:32:35 -04:00
pl Fix possible loss of sync between rectypeid and underlying PLpgSQL_type. 2019-12-26 15:19:39 -05:00
port In pgwin32_open, loop after ERROR_ACCESS_DENIED only if we can't stat. 2019-12-21 17:39:36 -05:00
template Fix compiler warning for ppoll() on Cygwin 2019-12-22 23:20:00 +01:00
test Revert "Rename files and headers related to index AM" 2019-12-27 08:09:00 +09:00
timezone Split all OBJS style lines in makefiles into one-line-per-entry style. 2019-11-05 14:41:07 -08:00
tools Clean up inconsistent backslash use in paths 2019-12-20 12:29:07 +01:00
tutorial Add .gitignore to src/tutorial/ 2019-11-22 21:14:54 +09:00
.gitignore
DEVELOPERS
Makefile Fix partial-build problems introduced by having more generated headers. 2018-04-09 16:42:10 -04:00
Makefile.global.in Select CFLAGS_SL at configure time, not in platform-specific Makefiles. 2019-10-21 12:32:35 -04:00
Makefile.shlib Clean up MinGW def file generation 2019-10-20 10:19:13 +02:00
nls-global.mk NLS: Fix backend gettext triggers 2019-09-23 09:04:20 +02:00