From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id XAA08528 for caml-red; Thu, 27 Jul 2000 23:31:16 +0200 (MET DST) Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id VAA05846 for ; Thu, 27 Jul 2000 21:04:39 +0200 (MET DST) Received: from tobago.inria.fr (tobago.inria.fr [128.93.8.21]) by concorde.inria.fr (8.10.0/8.10.0) with ESMTP id e6RJ4b521671; Thu, 27 Jul 2000 21:04:37 +0200 (MET DST) Received: (from doligez@localhost) by tobago.inria.fr (8.6.10/8.6.6) id VAA17061; Thu, 27 Jul 2000 21:04:35 +0200 Date: Thu, 27 Jul 2000 21:04:35 +0200 From: Damien Doligez Message-Id: <200007271904.VAA17061@tobago.inria.fr> To: frouaix@liquidmarket.com Subject: Re: automatic construction of mli files Cc: caml-list@inria.fr Sender: weis@pauillac.inria.fr >From: Francois Rouaix >This has to be one of the most cryptic comment ever made to this list. >And a "rather complex issue" coming from Damien, the mind boggles, especially >on this mysterious 8% figure. >Care to give some details ? OK. It has to do with examining the roots at the beginning of each minor collection. The global variables are roots, but each global variable is assigned only once, so we only need to examine it once (after that, the value will be in the major heap, so it is not a root for the minor collector). We do it by remembering which modules have executed some initialisation code since the last collection, and only examining their globals. The 8% figure comes from the speedup on Coq that we got when we implemented the trick. Actually, now that you force me to remember the complex part, I want to take back my comment. It's the fact that only the exported symbols are roots, so using .mli files will speed up the first garbage collections, and only by a small amount. Using an empty .mli file for your main module (the one that's linked last) will speed up all garbage collections (because the initialisation of that module is only complete when the program stops running), again by a very small amount. I have to apologize for not checking my facts before I posted to the list. Oh, and this applies only to programs compiled with ocamlopt. -- Damien