Re: Implement memcmp function with help from gcc's inline asm
- From: "Jacek Wawrzaszek" <no.mail@xxxxxxx>
- Date: Sat, 25 Jun 2005 21:32:47 +0000 (UTC)
"Netocrat" wrote:
For reference, here is the final version of my code. Note that I have re-arranged the tests so the test for equality comes first - this optimises ever so slightly for long bits of equal memory but the performance gain whilst slight is measurable.
There is no need for bswap when testing for equality. The expression (bswap(*ua) == bswap(*ub)) gives the same result as (*ua == *ub).
J.
.
- Follow-Ups:
- References:
- Prev by Date: Re: fastest way to check if +1 bit is set
- Next by Date: Re: 'Intel' CPU ID code crashes NTVDM on Athlon
- Previous by thread: Re: Implement memcmp function with help from gcc's inline asm
- Next by thread: Re: Implement memcmp function with help from gcc's inline asm
- Index(es):