Jeremy Kerr <j...@ozlabs.org> writes: >>> - inline is forbidden to use in PostgreSQL - you need exception or >>> do it differently
> (inline again: should I just make this a static, the compiler can inline > where possible? or do you want a macro?) I don't know where Zdenek got the idea that we have something against "inline". So far as I can see, recent versions of gcc claim to support __builtin_clz on all supported architectures. On some it might be no faster than our existing loop, but it seems unlikely to be slower. The two comments I have are * do something other than the hardwired "32" for word size; perhaps sizeof(int) * BITS_PER_BYTE. * do not use the separate "fls" function. On a compiler that fails to inline it, this patch would be a net performance loss, which we're not likely to tolerate for a patch that has no other reason to live than performance. Just #if the builtin right into the one place where it will be used. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers