diff options
author | letouzey <letouzey@85f007b7-540e-0410-9357-904b9bb8a0f7> | 2012-07-05 22:52:22 +0000 |
---|---|---|
committer | letouzey <letouzey@85f007b7-540e-0410-9357-904b9bb8a0f7> | 2012-07-05 22:52:22 +0000 |
commit | 57efd4e25db3d10ce6c36b428be7614de7076286 (patch) | |
tree | 1c89a87816c9e87f8c8f65344024e97cb78ee488 /plugins/extraction/common.ml | |
parent | 2ed6aeb03fc0e25a47223189d8444cbb6b749f2d (diff) |
Extraction: Hashtbl.replace uses less ressources than Hashtbl.add (fix #2824)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@15525 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'plugins/extraction/common.ml')
-rw-r--r-- | plugins/extraction/common.ml | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/extraction/common.ml b/plugins/extraction/common.ml index 0f0b902c3..6af939c19 100644 --- a/plugins/extraction/common.ml +++ b/plugins/extraction/common.ml @@ -199,7 +199,7 @@ let empty_env () = [], get_global_ids () let mktable autoclean = let h = Hashtbl.create 97 in if autoclean then register_cleanup (fun () -> Hashtbl.clear h); - (Hashtbl.add h, Hashtbl.find h, fun () -> Hashtbl.clear h) + (Hashtbl.replace h, Hashtbl.find h, fun () -> Hashtbl.clear h) (* We might have built [global_reference] whose canonical part is inaccurate. We must hence compare only the user part, |