This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: [RFC] i386 memcmp implementation
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Bonzini <bonzini at gnu dot org>
- Cc: libc-alpha at sources dot redhat dot com
- Date: Mon, 28 Oct 2002 23:28:49 +0100
- Subject: Re: [RFC] i386 memcmp implementation
- References: <002801c27ea7$36cda440$0f181897@bonz>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Mon, Oct 28, 2002 at 06:26:36PM +0100, Bonzini wrote:
orl %edi,%edi # If no characters to be compared
jz 7f # Exit immediately
cmpl $0x10,%edi # For small strings
jb 6f # we cannot afford startup overheads
Are you sure memcmp (x, y, 0) is that common?
Wouldn't it be better to move the test for zero to the branch with %edi
< 16?
Jakub