From owner-cvs-src@FreeBSD.ORG Sat Oct 27 00:46:08 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 4ABD416A418; Sat, 27 Oct 2007 00:46:08 +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 AF15313C4AC; Sat, 27 Oct 2007 00:46:07 +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 l9R0jtjo045738; Sat, 27 Oct 2007 04:45:55 +0400 (MSD) (envelope-from ache@nagual.pp.ru) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nagual.pp.ru; s=default; t=1193445955; bh=miAFTB5969low0RDEW8QqHhOL4kdJCSdfPBqWDd 4egc=; l=1030; h=Date:From:To:Cc:Subject:Message-ID: Mail-Followup-To:References:MIME-Version:Content-Type: Content-Disposition:In-Reply-To:User-Agent; b=iFwvnSQFcgzl2Su0gQ5t bTk+xPxsCGS+TGbG4q0REtKviIe3V6MBvs4LDLQWCgK3lB5cHPgeQFd+peswYnvnRB2 zCWVPqIHGF8VbA7sT1l3BLKYAW76fIAaFQIrCim/FIhumukpB5og5X1E36EuL2JAIZT bSMkeyHGSt/HQFggE= Received: (from ache@localhost) by nagual.pp.ru (8.14.1/8.14.1/Submit) id l9R0jsjm045737; Sat, 27 Oct 2007 04:45:54 +0400 (MSD) (envelope-from ache) Date: Sat, 27 Oct 2007 04:45:52 +0400 From: Andrey Chernov To: John-Mark Gurney Message-ID: <20071027004552.GA45608@nagual.pp.ru> Mail-Followup-To: Andrey Chernov , John-Mark Gurney , Rong-en Fan , Scott Long , John Baldwin , src-committers@FreeBSD.ORG, d@delphij.net, cvs-all@FreeBSD.ORG, Robert Watson , cvs-src@FreeBSD.ORG 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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20071026232641.GJ39759@funkthat.com> User-Agent: Mutt/1.5.16 (2007-06-09) Cc: Scott Long , src-committers@FreeBSD.ORG, d@delphij.net, John Baldwin , cvs-src@FreeBSD.ORG, Rong-en Fan , cvs-all@FreeBSD.ORG, Robert Watson Subject: Re: cvs commit: src/lib/libc/locale utf8.c 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: Sat, 27 Oct 2007 00:46:08 -0000 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/