From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49417) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VumSG-0000Oa-Ba for qemu-devel@nongnu.org; Sun, 22 Dec 2013 12:04:45 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VumS8-00019S-HQ for qemu-devel@nongnu.org; Sun, 22 Dec 2013 12:04:40 -0500 Received: from mail-pd0-x235.google.com ([2607:f8b0:400e:c02::235]:57684) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VumS8-00019I-9i for qemu-devel@nongnu.org; Sun, 22 Dec 2013 12:04:32 -0500 Received: by mail-pd0-f181.google.com with SMTP id p10so4369175pdj.12 for ; Sun, 22 Dec 2013 09:04:31 -0800 (PST) Sender: Richard Henderson Message-ID: <52B71B9B.3010707@twiddle.net> Date: Sun, 22 Dec 2013 09:04:27 -0800 From: Richard Henderson MIME-Version: 1.0 References: <1387711957-703-1-git-send-email-aurelien@aurel32.net> In-Reply-To: <1387711957-703-1-git-send-email-aurelien@aurel32.net> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] bitops: provide an inline implementation of find_first_bit List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Aurelien Jarno , qemu-devel@nongnu.org Cc: Corentin Chary On 12/22/2013 03:32 AM, Aurelien Jarno wrote: > find_first_bit has started to be used heavily in TCG code. The current > implementation based on find_next_bit is not optimal and can't be > optimized be the compiler if the bit array has a fixed size, which is > the case most of the time. > > This new implementation does not use find_next_bit and is yet small > enough to be inlined. > > Cc: Richard Henderson > Cc: Corentin Chary > > Signed-off-by: Aurelien Jarno > --- > include/qemu/bitops.h | 12 +++++++++++- > 1 file changed, 11 insertions(+), 1 deletion(-) Reviewed-by: Richard Henderson r~