When optimizing, the compiler will most likely replace the call to memcmp(),
but at -O0, the code that is emitted builds the call preamble and does the
call. Let's use the same pattern as with sd_id128_is_null() and
sd_id128_is_allf() and avoid the call.
#a #b #c #d "-" #e #f "-" #g #h "-" #i #j "-" #k #l #m #n #o #p
_sd_pure_ static __inline__ int sd_id128_equal(sd_id128_t a, sd_id128_t b) {
- return memcmp(&a, &b, 16) == 0;
+ return a.qwords[0] == b.qwords[0] && a.qwords[1] == b.qwords[1];
}
_sd_pure_ static __inline__ int sd_id128_is_null(sd_id128_t a) {