From: Denis Zaitsev <zzz@anda.ru>
To: Zack Weinberg <zack@codesourcery.com>,
Andreas Jaeger <aj@suse.de>, Richard Henderson <rth@redhat.com>
Cc: libc-alpha@sources.redhat.com, linux-gcc@vger.kernel.org
Subject: strcmp is too heavy for its everyday usage...
Date: Thu, 8 Jan 2004 06:09:24 +0500 [thread overview]
Message-ID: <20040108060924.A4431@zzz.ward.six> (raw)
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?
next reply other threads:[~2004-01-08 1:09 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-01-08 1:09 Denis Zaitsev [this message]
2004-01-08 1:13 ` strcmp is too heavy for its everyday usage Roland McGrath
2004-01-08 1:36 ` Denis Zaitsev
2004-01-08 9:30 ` Andreas Schwab
2004-01-09 5:11 ` Denis Zaitsev
2004-01-09 8:12 ` Richard Henderson
2004-01-09 8:49 ` Denis Zaitsev
2004-01-14 5:09 ` James Antill
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20040108060924.A4431@zzz.ward.six \
--to=zzz@anda.ru \
--cc=aj@suse.de \
--cc=libc-alpha@sources.redhat.com \
--cc=linux-gcc@vger.kernel.org \
--cc=rth@redhat.com \
--cc=zack@codesourcery.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.