allow ffs & co. a binary search

Erich Dollansky erichsfreebsdlist at alogt.com
Tue Aug 11 23:23:28 UTC 2015


Hi,

On Tue, 11 Aug 2015 11:02:27 +0200
Hans Petter Selasky <hps at selasky.org> wrote:

> On 08/11/15 04:03, Erich Dollansky wrote:
> > Why not detect the built-in functions and do the binary search when
> > they are not available and leave the original implementation for all
> > other sizes?
> 
> How can we detect this compile time?

the compiler is known to macros at compile time. We can use this then
for known compilers (gcc and clang) and use binary search for unknown
compilers.

I would not like to spend time on the hack as it would have to be
tested.

Of course, for unknown data sizes, I would leave the original in.

As long as FreeBSD does not switch the compiler again, this will work.

Erich


More information about the freebsd-hackers mailing list