Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 12 Aug 2015 07:23:14 +0800
From:      Erich Dollansky <erichsfreebsdlist@alogt.com>
To:        Hans Petter Selasky <hps@selasky.org>
Cc:        Konstantin Belousov <kostikbel@gmail.com>, "freebsd-hackers@freebsd.org" <freebsd-hackers@FreeBSD.org>, Andriy Gapon <avg@FreeBSD.org>
Subject:   Re: allow ffs & co. a binary search
Message-ID:  <20150812072314.5ff873ec@X220.alogt.com>
In-Reply-To: <55C9BA23.10407@selasky.org>
References:  <20150607081315.7c0f09fb@B85M-HD3-0.alogt.com> <5573EA5E.40806@selasky.org> <20150607195245.62dc191f@B85M-HD3-0.alogt.com> <20150607135453.GH2499@kib.kiev.ua> <558175FA.4040106@FreeBSD.org> <20150617165331.GA2080@kib.kiev.ua> <5582CCF1.8010505@FreeBSD.org> <55C335A7.8020503@selasky.org> <20150811100327.0d12231f@X220.alogt.com> <55C9BA23.10407@selasky.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi,

On Tue, 11 Aug 2015 11:02:27 +0200
Hans Petter Selasky <hps@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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20150812072314.5ff873ec>