Re: please verify the code



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/

.



Relevant Pages

  • Re: About Machine Performance issue
    ... waitio is a meaningless metric. ... Please describe the performance problem. ... Tell us what load the system ... Prev by Date: ...
    (comp.unix.solaris)
  • Re: copymemory basic question
    ... > optimizer can do it or not, ... predict what is most efficient and what is a performance problem. ... > it's best to test it with a timing routine to see which method is faster. ... Prev by Date: ...
    (microsoft.public.vb.winapi)
  • Re: How to delete STATSPACK data efficient to release back space?
    ... Are you really running into any performance problem? ... higher intervel like say 1 ro 2 hours. ... WantedToBeDBA. ... Prev by Date: ...
    (comp.databases.oracle.server)
  • Re: FastMove bad RTL Replacement for Athlon XP
    ... Main interest is to locate the performance problem. ... This time I am interested to see how effective patching is also. ... Best regards ... Prev by Date: ...
    (borland.public.delphi.language.basm)