From owner-cvs-src@FreeBSD.ORG Wed Oct 31 22:40:10 2007 Return-Path: Delivered-To: cvs-src@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A9DD916A419; Wed, 31 Oct 2007 22:40:10 +0000 (UTC) (envelope-from ache@nagual.pp.ru) Received: from nagual.pp.ru (nagual.pp.ru [194.87.13.69]) by mx1.freebsd.org (Postfix) with ESMTP id 241EF13C48E; Wed, 31 Oct 2007 22:40:09 +0000 (UTC) (envelope-from ache@nagual.pp.ru) Received: from nagual.pp.ru (ache@localhost [127.0.0.1]) by nagual.pp.ru (8.14.1/8.14.1) with ESMTP id l9VMdB9l091140; Thu, 1 Nov 2007 01:39:11 +0300 (MSK) (envelope-from ache@nagual.pp.ru) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nagual.pp.ru; s=default; t=1193870351; bh=yIh+LekTwSshce3kkehTCTAr7duG4N9/MpA1v/S /M/4=; l=901; h=Date:From:To:Cc:Subject:Message-ID:Mail-Followup-To: References:MIME-Version:Content-Type:Content-Disposition: In-Reply-To:User-Agent; b=diwIT/20dq+2zf6mJ/bcHCKf1tOYTbh9suagG5o5 sP6wQ3OMt1gNljVbWneyDoQnBSHyJeEIt5ag1RI36C4kj1+mG3sZnGGWdm3wD44n/kR uYZOO9kuKUQ50LY1cC9qxxHfxx4ayJstShSzreoUmmMjPuFrpYp5/dfb49GoKQ08= Received: (from ache@localhost) by nagual.pp.ru (8.14.1/8.14.1/Submit) id l9VMdBLI091139; Thu, 1 Nov 2007 01:39:11 +0300 (MSK) (envelope-from ache) Date: Thu, 1 Nov 2007 01:39:11 +0300 From: Andrey Chernov To: Bruce Evans Message-ID: <20071031223911.GC90994@nagual.pp.ru> Mail-Followup-To: Andrey Chernov , Bruce Evans , Christoph Mallon , src-committers@FreeBSD.ORG, cvs-src@FreeBSD.ORG, cvs-all@FreeBSD.ORG References: <200710272232.l9RMWSbK072082@repoman.freebsd.org> <47264710.2000500@gmx.de> <20071101024451.T4289@delplex.bde.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20071101024451.T4289@delplex.bde.org> User-Agent: Mutt/1.5.16 (2007-06-09) Cc: cvs-src@FreeBSD.ORG, Christoph Mallon , src-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG Subject: Re: cvs commit: src/include _ctype.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, 31 Oct 2007 22:40:10 -0000 On Thu, Nov 01, 2007 at 03:23:56AM +1100, Bruce Evans wrote: > In fact, one of the cleanups/optimizations in rev.1.5 and 1.6 by ache > and me was to get rid of the mask. There was already a check for _c > < 0, so the mask cost even more. The top limit was 256 instead of > 128, so the point about 8bit immediates didn't apply, but I don't know > of any machines where the mask is faster (didn't look hard :-). OTOH, > _c is often a char or a u_char (it is declared as mumble_rune_t, but > the functions are inline so the compiler can see the original type. > If _c is u_char and u_char is uint8_t, then (_c < 0 || c >= 256) is > always false, so the compiler should generate no code for it. The top > limit of 256 was preferred so that this optimization is possible. A > top limit of 128 doesn't work so well. Please see the tests posted in this thread. -- http://ache.pp.ru/