author | wenzelm |
Wed, 13 Jul 2011 20:13:27 +0200 | |
changeset 43793 | 9c9a9b13c5da |
parent 43792 | d5803c3d537a |
child 43794 | 49cbbe2768a8 |
--- a/src/Pure/library.ML Wed Jul 13 16:42:14 2011 +0200 +++ b/src/Pure/library.ML Wed Jul 13 20:13:27 2011 +0200 @@ -908,7 +908,8 @@ val string_ord = String.compare; fun fast_string_ord (s1, s2) = - (case int_ord (size s1, size s2) of EQUAL => string_ord (s1, s2) | ord => ord); + if pointer_eq (s1, s2) then EQUAL + else (case int_ord (size s1, size s2) of EQUAL => string_ord (s1, s2) | ord => ord); fun option_ord ord (SOME x, SOME y) = ord (x, y) | option_ord _ (NONE, NONE) = EQUAL