strcmp is too heavy for its everyday usage...
Denis Zaitsev <[email protected]> Thu, 8 Jan 2004 06:09:24 +0500
| Newsgroups | org.kernel.vger.linux-gcc |
|---|---|
| Message-ID | <[email protected]> |
strcmp is _mostly_ used here and there to check strings for equality only, not for finding their ordering. And if we have a function for this equality check only, it would be a reasonable benefit: a) for a long strings this function can operate with a whole words vs. bytes, which is much faster; b) for a very short strings, when strcmp and this function can be unrolled into a series of a direct bytes comparing, this defun don't have to cope with (unsigned char) -> (int) casting for the each pair of bytes, so it will be shorter, faster etc. memcmp is the subject of the question, too. Any comments?