drop unused Set().ord, which is potentially inefficient due to dict_ord/dest;
authorwenzelm
Tue, 18 Apr 2023 19:11:05 +0200
changeset 77875 9374e13655e8
parent 77874 c274f52b11ff
child 77876 1d3b3bf5ea3f
drop unused Set().ord, which is potentially inefficient due to dict_ord/dest;
src/Pure/General/set.ML
--- a/src/Pure/General/set.ML	Tue Apr 18 18:27:22 2023 +0200
+++ b/src/Pure/General/set.ML	Tue Apr 18 19:11:05 2023 +0200
@@ -24,7 +24,6 @@
   val member: T -> elem -> bool
   val subset: T * T -> bool
   val eq_set: T * T -> bool
-  val ord: T ord
   val insert: elem -> T -> T
   val make: elem list -> T
   val merge: T * T -> T
@@ -238,7 +237,7 @@
   in get end;
 
 
-(* member *)
+(* member and subset *)
 
 fun member set elem =
   let
@@ -274,22 +273,11 @@
       | mem (Size (_, arg)) = mem arg;
   in mem set end;
 
-
-(* subset and order *)
-
 fun subset (set1, set2) = forall (member set2) set1;
 
 fun eq_set (set1, set2) =
   pointer_eq (set1, set2) orelse size set1 = size set2 andalso subset (set1, set2);
 
-val ord =
-  pointer_eq_ord (fn sets =>
-    (case int_ord (apply2 size sets) of
-      EQUAL =>
-        if subset sets then EQUAL
-        else dict_ord Key.ord (apply2 dest sets)
-    | ord => ord));
-
 
 (* insert *)