mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-08-21 18:33:24 +02:00
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 |
||
---|---|---|
.. | ||
adt | ||
cache | ||
error | ||
fmgr | ||
hash | ||
init | ||
mb | ||
misc | ||
mmgr | ||
resowner | ||
sort | ||
time | ||
.gitignore | ||
errcodes.txt | ||
Gen_dummy_probes.pl | ||
Gen_dummy_probes.sed | ||
Gen_fmgrtab.pl | ||
generate-errcodes.pl | ||
Makefile | ||
probes.d |