Why does glibc’s strlen need to be so complicated to run quickly?
You don’t need and you should never write code like that – especially if you’re not a C compiler / standard library vendor. It is code used to implement strlen with some very questionable speed hacks and assumptions (that are not tested with assertions or mentioned in the comments): unsigned long is either 4 or … Read more