possible micro optimization:

String.length {s1,s2} = 0 should be checked first since s1 = s2 could potentially a lot more expensive in the worst case.

What do you think?