From 9e37e3b9695a214040c52082b1e7288df9362b33 Mon Sep 17 00:00:00 2001 From: ppedrot Date: Thu, 24 Oct 2013 17:28:00 +0000 Subject: Specializing hash functions for widely used types. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@16933 85f007b7-540e-0410-9357-904b9bb8a0f7 --- kernel/closure.ml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'kernel/closure.ml') diff --git a/kernel/closure.ml b/kernel/closure.ml index a32be4f69..98fb467c8 100644 --- a/kernel/closure.ml +++ b/kernel/closure.ml @@ -213,7 +213,11 @@ module IdKeyHash = struct type t = id_key let equal = Names.eq_id_key - let hash = Hashtbl.hash + open Hashset.Combine + let hash = function + | ConstKey c -> combinesmall 1 (Constant.hash c) + | VarKey id -> combinesmall 2 (Id.hash id) + | RelKey i -> combinesmall 3 (Int.hash i) end module KeyTable = Hashtbl.Make(IdKeyHash) -- cgit v1.2.3