Messages in this thread | | | Date | 8 Aug 2011 06:52:01 -0400 | From | "George Spelvin" <> | Subject | Re: [PATCH] add slice by 8 algorithm to crc32.c |
| |
> I prefer to keep the current code which (at the time) generated good code > for at least ppc: > /* Align it */ > if (unlikely((long)buf & 3 && len)) { > do { > DO_CRC(*buf++); > } while ((--len) && ((long)buf)&3); > }
Ah, I was looking at fzago's initial patch; I hadn't realized you'd tweaked it. That's pretty much what I was talking about.
Would if (unlikely((long)buf & 3) && len) {
give the compiler better hints? len != 0 is awfully likely, actually.
| |