Use this instead of std.string.cmp() because we don't care about lexicographic ordering. This is faster.
See Implementation