Date: Thu, 11 Jun 2015 08:52:53 -0600 From: Ian Lepore <ian@freebsd.org> To: Richard Yao <ryao@gentoo.org> Cc: Erich Dollansky <erichsfreebsdlist@alogt.com>, "freebsd-hackers@freebsd.org" <freebsd-hackers@FreeBSD.org> Subject: Re: allow ffs & co. a binary search Message-ID: <1434034373.1415.3.camel@freebsd.org> In-Reply-To: <5579A016.4040800@gentoo.org> References: <20150607081315.7c0f09fb@B85M-HD3-0.alogt.com> <5579A016.4040800@gentoo.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 2015-06-11 at 10:49 -0400, Richard Yao wrote: > On 06/06/2015 08:13 PM, Erich Dollansky wrote: [...] > > The fastest portable way of calculating highest bit set is to use a > debrujin sequence: > > https://graphics.stanford.edu/~seander/bithacks.html#IntegerLogDeBruijn > > The binary approach is inferior, especially on Pentium 4 processors. And of course it's crucial that we optimize for Pentium 4 processors in 2015. -- Ian
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1434034373.1415.3.camel>