I mean, it's definitely a neat way to optimize comparisons for the CPU's word size. The problem is with completely unexplained things like:
#define ONES ((size_t)-1/UCHAR_MAX)
Reading through the loop, it seems as though it will create, e.g., 0x01010101 for a 32-bit machine with 8-bit bytes. And sure enough, if you calculate ((2^32)-1)/255 that's exactly what you get. But I never would've known that without going through the code and proving to myself that the definitely of ONES actually makes sense.If you write code like this and there are never any bugs then fine, I guess. But there will bugs.