From owner-svn-src-head@FreeBSD.ORG Tue Oct 21 07:54:50 2014 Return-Path: Delivered-To: svn-src-head@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DCD727FC; Tue, 21 Oct 2014 07:54:50 +0000 (UTC) Received: from theravensnest.org (theraven.freebsd.your.org [216.14.102.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cloud.theravensnest.org", Issuer "StartCom Class 1 Primary Intermediate Server CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id AB7A91A3; Tue, 21 Oct 2014 07:54:49 +0000 (UTC) Received: from [192.168.0.106] (cpc14-cmbg15-2-0-cust307.5-4.cable.virginm.net [82.26.1.52]) (authenticated bits=0) by theravensnest.org (8.14.9/8.14.9) with ESMTP id s9L7si0O099321 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Tue, 21 Oct 2014 07:54:46 GMT (envelope-from theraven@FreeBSD.org) X-Authentication-Warning: theravensnest.org: Host cpc14-cmbg15-2-0-cust307.5-4.cable.virginm.net [82.26.1.52] claimed to be [192.168.0.106] Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: svn commit: r273274 - head/sys/netpfil/ipfw From: David Chisnall In-Reply-To: <5443A83F.5090807@FreeBSD.org> Date: Tue, 21 Oct 2014 08:54:35 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: <6FEB1269-2A8D-48A7-A18E-2EAB9961EDA6@FreeBSD.org> References: <201410191115.s9JBFJxA058370@svn.freebsd.org> <5443A83F.5090807@FreeBSD.org> To: Andriy Gapon X-Mailer: Apple Mail (2.1878.6) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, "Alexander V. Chernikov" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Oct 2014 07:54:51 -0000 On 19 Oct 2014, at 13:02, Andriy Gapon wrote: > I think that on platforms where an optimized version of fls() is = available that > would work faster than this cool piece of bit magic. If you're lucky, the compiler's idiom recogniser will spot this. You're = generally better off using the builtins though, because then the = compiler will expand them to something sensible (hopefully - old = versions of gcc did horribly inefficient things for bswap and clz on = platforms without native support). David