Efficient string comparison.