Changes between Initial Version and Version 1 of Ticket #854, comment 11


Ignore:
Timestamp:
03/09/17 08:10:46 (7 years ago)
Author:
Steffan Karger
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #854, comment 11

    initial v1  
    99> Is that strlen() truly needed?  Okay, I see the argument of being explicit what the length refers to.  But how will this hit the performance?  Will the compiler be smart enough to optimize this not to call strlen() for each iteration?
    1010
    11 No, it will not.  Both gcc and clang with -O2 do not emit any calls to strlen().  See for example the following intermixed assembly generated by gcc:
     11Yes, compilers are smart enough to optimize the strlen() calls away.  Both gcc and clang with -O2 do not emit any calls to strlen().  See for example the following intermixed assembly generated by gcc:
    1212
    1313{{{