let rec compare a b = let ha = hash a and hb = hash b in if ha < hb then -1 else if ha = hb then if eq1 a b then 0 else Pervasives.compare a b else 1