Routines strcmp
for comparing char *
and memcmp
for everything else, do they run faster on memory block (on x86_64) which is somehow aligned (how?)? Does libc use SSE
for this routines?
It depends, but on architectures where alignment matters or where SIMD instructions are available, typically the routines will operate on leading bytes, then do as many wide aligned operations as the data allows, then operate on trailing bytes.
Whether the leading and trailing bytes are contributing significantly to the processing time for your data can be determined by experiment.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With