From owner-cvs-src@FreeBSD.ORG Wed Feb 14 05:21:23 2007 Return-Path: X-Original-To: cvs-src@FreeBSD.org Delivered-To: cvs-src@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C68D316A402; Wed, 14 Feb 2007 05:21:23 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [69.147.83.41]) by mx1.freebsd.org (Postfix) with ESMTP id A086B13C471; Wed, 14 Feb 2007 05:21:23 +0000 (UTC) (envelope-from cperciva@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id l1E5LNBZ044121; Wed, 14 Feb 2007 05:21:23 GMT (envelope-from cperciva@repoman.freebsd.org) Received: (from cperciva@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id l1E5LNQr044119; Wed, 14 Feb 2007 05:21:23 GMT (envelope-from cperciva) Message-Id: <200702140521.l1E5LNQr044119@repoman.freebsd.org> From: Colin Percival Date: Wed, 14 Feb 2007 05:21:23 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Cc: Subject: cvs commit: src/sys/sys systm.h X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Feb 2007 05:21:23 -0000 cperciva 2007-02-14 05:21:22 UTC FreeBSD src repository Modified files: sys/sys systm.h Log: Optimize bitcount32 by replacing 6 logical operations with 2. The key observation here is that it doesn't matter what garbage accumulates in bits which we're going to end up masking away anyway, as long as the garbage doesn't overflow into bits which we care about. This improved version may not be the fastest possible on all systems, but it's certainly going to be better than what was here before. Revision Changes Path 1.249 +3 -3 src/sys/sys/systm.h