What\'s the quickest to compare two strings in Java?
Is there something faster than equals?
EDIT: I can not help much to clarify the problem.
I have
If you can show that it's a significant bottleneck, which would surprise me, you could try
s1.hashCode() == s2.hashCode() && s1.equals(s2)
It might be a bit faster. It mightn't.