From fb9dfa53f2f71ed501be27213600143ee0b7554d Mon Sep 17 00:00:00 2001 From: Pierre-Marie Pédrot Date: Mon, 22 Aug 2016 17:13:14 +0200 Subject: Fast path for set operations. We consider an approximation of the size of sets before choosing the most appropriate algorithm. This drastically affects some universe-polymorphic code which was doing a lot of set operations on disimilar sizes. --- lib/cMap.mli | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib/cMap.mli') diff --git a/lib/cMap.mli b/lib/cMap.mli index 3ef7fa2c8a..2838b374ec 100644 --- a/lib/cMap.mli +++ b/lib/cMap.mli @@ -61,6 +61,9 @@ sig val smartmapi : (key -> 'a -> 'a) -> 'a t -> 'a t (** As [mapi] but tries to preserve sharing. *) + val height : 'a t -> int + (** An indication of the logarithmic size of a map *) + module Unsafe : sig val map : (key -> 'a -> key * 'b) -> 'a t -> 'b t -- cgit v1.2.3