Date: Thu, 1 Nov 2007 01:23:41 +0300 From: Andrey Chernov <ache@nagual.pp.ru> To: Alexey Dokuchaev <danfe@FreeBSD.ORG> Cc: cvs-src@FreeBSD.ORG, Christoph Mallon <christoph.mallon@gmx.de>, src-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG Subject: Re: cvs commit: src/include _ctype.h Message-ID: <20071031222341.GB90781@nagual.pp.ru> In-Reply-To: <20071030064446.GC68358@FreeBSD.org> References: <200710272232.l9RMWSbK072082@repoman.freebsd.org> <47264710.2000500@gmx.de> <20071030064446.GC68358@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Oct 30, 2007 at 06:44:46AM +0000, Alexey Dokuchaev wrote:
> On Mon, Oct 29, 2007 at 09:48:16PM +0100, Christoph Mallon wrote:
> > Andrey A. Chernov wrote:
> > >ache 2007-10-27 22:32:28 UTC
> > >
> > > FreeBSD src repository
> > >
> > > Modified files:
> > > include _ctype.h
> > > Log:
> > > Micro-optimization of prev. commit, change
> > > (_c < 0 || _c >= 128) to (_c & ~0x7F)
> > >
> > > Revision Changes Path
> > > 1.33 +1 -1 src/include/_ctype.h
> >
> > Further IMO it is hard to decipher what _c & ~0x7F is supposed to do.
>
> Seconded. Messing with bits should be avoided when their use masks out
> the logic behind. Nowadays it's almost always better to trust the
> compiler to do its optimizing job.
I just want to keep all ctype in style, and it comes from is{w}ascii(). Do
you want rewrite is{w}ascii() to non-optimized case? Note that
non-optimized case generate very long code when no optimization used in
compiler which may happens in some cases (like avoiding gcc optimization
bugs etc.)
--
http://ache.pp.ru/
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20071031222341.GB90781>
