*BSD News Article 18598


Return to BSD News archive

Newsgroups: comp.os.386bsd.bugs
Path: sserve!newshost.anu.edu.au!munnari.oz.au!spool.mu.edu!wupost!uunet!psinntp!uuneo!sugar!peter
From: peter@NeoSoft.com (Peter da Silva)
Subject: Re: ctype.h Bug & Fix
Organization: NeoSoft Communications Services -- (713) 684-5900
Date: Sun, 18 Jul 1993 21:08:25 GMT
Message-ID: <CADpE2.86p@sugar.NeoSoft.COM>
References: <CA69Fo.Lwv@bi-link.owl.de> <CA9B9F.Gx5@sugar.NeoSoft.COM> <22ce1bINN21k@godzilla.zeta.org.au>
Lines: 15

In article <22ce1bINN21k@godzilla.zeta.org.au> bde@kralizec.zeta.org.au (Bruce Evans) writes:
> #define toupper(c)	__toupper_table[(c) + 128];	/* -128 <= c < 255 */

In a loop is the cache-bashing this does going to cost less than the pipeline
bashing the version with the comparisons does? Which is faster is probably
processor dependent. Especially since the comparisons can in principle be
optimised out in many cases.

I'd be happy with either code, just pointing out that efficiency isn't always
obvious these days.
-- 
Peter da Silva.  <peter@sugar.neosoft.com>.
 `-_-'   Hefur pu fadmad ulfinn i dag?
  'U`    
"Det er min ledsager, det er ikke drikkepenge."