Re: please verify the code
- From: websnarf@xxxxxxxxx
- Date: 23 Dec 2005 01:18:37 -0800
Joe Wright wrote:
> websnarf@xxxxxxxxx wrote:
> > Notice how there is no "#include <string.h>" here? As a good rule of
> > thumb -- there is a good chance you are introducing performance
> > problems if you have included that file.
> >
> Ok, I'll bite. How does "#include <string.h>" affect the performance of
> anything that doesn't use it?
Its a rule of thumb -- and it seems I got it wrong. You need string.h
for things like memcpy(), which of course it not a performance problem.
Its really the use of str* functions that tells you you have a
potential performance problem. So I'll go back to my old heuristic
which says if you call strlen(), then you have thrown performance out
the window.
--
Paul Hsieh
http://www.pobox.com/~qed/
http://bstring.sf.net/
.
- References:
- please verify the code
- From: Roman Mashak
- Re: please verify the code
- From: websnarf
- Re: please verify the code
- From: Joe Wright
- please verify the code
- Prev by Date: Getting substrings in C
- Next by Date: Re: Reverse a string "in place"
- Previous by thread: Re: please verify the code
- Next by thread: A small clarification ...
- Index(es):
Relevant Pages
|
|