On 04/28/2011 02:55 AM, Erik Faye-Lund wrote: > > I disagree. We have no guarantee that the SHA-1s are aligned on x86 > either, and unaligned accesses are slow on x86. > Not particularly, especially not statistically. Furthermore, for a sizable chunk like a SHA-1, not all accesses will have the cross-grain penalities that you sometimes can have. > I think it's much much cleaner to add an early-out on the first byte, > and hope that memcmp is optimized properly. If it's not, those > platforms can add an override to memcmp in git-compat-util and/or > compat/*. Overall, doing an architecture optimization library especially for widely used architectures like x86 is not a bad idea. -hpa -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html