Use compare() instead which will terminate faster if things don't match.
mentioned in commit 4380f1ae