strlen performance implementation
问题 This is a multipurpose question: How does this compare to the glibc strlen implementation? Is there a better way to to this in general and for autovectorization. Random filler crap because stackoverflow somehow knows better than me about code to summary ratio #include <stdint.h> #include <stdlib.h> #include <string.h> #include <limits.h> #include <stdbool.h> #include <stdlib.h> /* Todo: Document */ #define WORD_ONES_LOW ((size_t)-1 / UCHAR_MAX) #define WORD_ONES_HIGH (((size_t)-1 / UCHAR_MAX)