This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC] i386 memcmp implementation


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]