by aengvs · 3y ago · 0 comments
Does the compiler know that this isn't true? No, it doesn't. The author of the article is making an assumption about the contents of the data that might seem reasonable but isn't necessarily true.
Of course there are still some cases where non-zero strings are extremely rare and as such optimizing for those makes sense.