Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 9 May 2007 02:25:22 +0400
From:      Andrey Chernov <ache@freebsd.org>
To:        "Sean C. Farley" <sean-freebsd@farley.org>
Cc:        Daniel Eischen <deischen@freebsd.org>, arch@freebsd.org
Subject:   Re: HEADS DOWN
Message-ID:  <20070508222521.GA59534@nagual.pp.ru>
In-Reply-To: <20070508162458.G6015@baba.farley.org>
References:  <20070502230413.Y30614@thor.farley.org> <20070503160351.GA15008@nagual.pp.ru> <20070504085905.J39482@thor.farley.org> <20070504213312.GA33163@nagual.pp.ru> <20070504174657.D1343@thor.farley.org> <20070505213202.GA49925@nagual.pp.ru> <20070505163707.J6670@thor.farley.org> <20070505221125.GA50439@nagual.pp.ru> <20070506091835.A43775@besplex.bde.org> <20070508162458.G6015@baba.farley.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, May 08, 2007 at 04:37:03PM -0500, Sean C. Farley wrote:
>  Would it be preferred to go ahead to use strlen() in preparation for a
>  faster strlen() in the future?  

IMHO with this note from Bruce
"Of course, optimizing strlen() is unimportant, since even the slowest
method runs at nearly 1GB/S on modern machines and you rarely have
more than a few MB of strings to process."

and this one from Kostik
"gcc 4.3 claims to not issue cld instruction anymore (ABI requires direction
flag to be clear since eon)."

we can use strlen() in preparation for the future.

>  I would still use the inline'd version
>  when counting characters while watching for an '=' character.  Or should
>  it also be changed to perform a strlen() and then a strchr()?

Combined strlen()+strchr() will be slower in any case than single loop, so 
better leave it as is.

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



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