Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 27 Oct 2007 04:45:52 +0400
From:      Andrey Chernov <ache@nagual.pp.ru>
To:        John-Mark Gurney <gurney_j@resnet.uoregon.edu>
Cc:        Scott Long <scottl@samsco.org>, src-committers@FreeBSD.ORG, d@delphij.net, John Baldwin <jhb@FreeBSD.ORG>, cvs-src@FreeBSD.ORG, Rong-en Fan <grafan@gmail.com>, cvs-all@FreeBSD.ORG, Robert Watson <rwatson@FreeBSD.ORG>
Subject:   Re: cvs commit: src/lib/libc/locale utf8.c
Message-ID:  <20071027004552.GA45608@nagual.pp.ru>
In-Reply-To: <20071026232641.GJ39759@funkthat.com>
References:  <200710150951.l9F9pUm7026506@repoman.freebsd.org> <20071025233536.B99770@fledge.watson.org> <472120E8.90504@samsco.org> <200710261144.34645.jhb@freebsd.org> <472217C2.8020800@samsco.org> <6eb82e0710260954m73b3f17bq2c72a4cdb597640e@mail.gmail.com> <20071026190039.GB38843@nagual.pp.ru> <20071026232641.GJ39759@funkthat.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Oct 26, 2007 at 04:26:41PM -0700, John-Mark Gurney wrote:
> > Although standard permits functions only, I object against permanent 
> > removing inlines from ctype. Almost every system have them as macros or 
> > inlines and not as function calls, and it is for reason. Ctype functions 
> > are very inside-loop-intensive, and not speeding them up may slowdown apps 
> > which do intensive text processing.
> 
> Have you done benchmarks to prove that making it a function will slow
> it down significantly?  Things have changed over the years....

They slowed as function call with parameter can slow, the rest depends on 
application. The same is true about, say getc() macro vs. function 
call, especially noting that they usually are called in pair in the same 
loop. If we don't need inlines/macros here, why to keep getc() as macro?
getc() is much more slower by the nature because requires physical IO, so 
it will be very strange to keep getc() as macro but remove ctype.

-- 
http://ache.pp.ru/



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20071027004552.GA45608>