-
-
Notifications
You must be signed in to change notification settings - Fork 24
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
Something like:
int memcmp(const void *vl, const void *vr, size_t n) {
const uint64_t *wl = (const uint64_t *)vl;
const uint64_t *wr = (const uint64_t *)vr;
if (n >= 4 * sizeof(uint64_t)) {
do {
if (*wl != *wr) break;
n -= sizeof(uint64_t);
wl++;
wr++;
} while (n >= sizeof(uint64_t));
}
const char *b1 = (const char *)wl;
const char *b2 = (const char *)wr;
while (n--) {
if (*b1 != *b2) return *b1 - *b2;
b1++;
b2++;
}
return 0;
}
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request