cvs commit: src/include _ctype.h

Andrey Chernov ache at nagual.pp.ru
Wed Oct 31 15:29:28 PDT 2007


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/


More information about the cvs-all mailing list