Micro-optimizations around string comparisons