|
-
March 26th, 2006, 06:52 PM
#1
efficient string comparison
Hi,
I've read that the function calls of the mem*() family (such as memcpy() and memcmp() ) are more efficient that the function calls of the str*() family (such as strcpy() and strcmp() ) becaue they do not require the additional overhead of checking for null string termination (see Efficient C++ by Bulka and Mayhew).
In general, if I did not know the string length, what function should I use for the best efficiency? strcmp() or the compare() function of the std::string class or something else?
Can any summarize some guiding wisdom?
Thanks,
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|