From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by sympa.inria.fr (Postfix) with ESMTPS id 490EA7EE4E for ; Thu, 3 Oct 2013 19:45:09 +0200 (CEST) Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of alain@frisch.fr) identity=pra; client-ip=193.252.23.211; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="alain@frisch.fr"; x-sender="alain@frisch.fr"; x-conformance=sidf_compatible Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of alain@frisch.fr) identity=mailfrom; client-ip=193.252.23.211; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="alain@frisch.fr"; x-sender="alain@frisch.fr"; x-conformance=sidf_compatible Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@msa.smtpout.orange.fr) identity=helo; client-ip=193.252.23.211; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="alain@frisch.fr"; x-sender="postmaster@msa.smtpout.orange.fr"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgABADisTVLB/BfTnGdsb2JhbABZhzm7IoJ7gTgOAQEBAQEIFAk8giUBAQUjDwEFQBELGAICBRYLAgIJAwIBAgFFBgEMCAEBiAaqL5I4gSmOL4JqgTkDmAGGNY5w X-IPAS-Result: AgABADisTVLB/BfTnGdsb2JhbABZhzm7IoJ7gTgOAQEBAQEIFAk8giUBAQUjDwEFQBELGAICBRYLAgIJAwIBAgFFBgEMCAEBiAaqL5I4gSmOL4JqgTkDmAGGNY5w X-IronPort-AV: E=Sophos;i="4.90,1027,1371074400"; d="scan'208";a="35471253" Received: from msa02.smtpout.orange.fr (HELO msa.smtpout.orange.fr) ([193.252.23.211]) by mail2-smtp-roc.national.inria.fr with ESMTP; 03 Oct 2013 19:45:07 +0200 Received: from [192.168.1.115] ([92.151.31.111]) by mwinf5d07 with ME id Yhl71m00B2PrCbg03hl7Bo; Thu, 03 Oct 2013 19:45:07 +0200 Message-ID: <524DAD23.7070206@frisch.fr> Date: Thu, 03 Oct 2013 19:45:07 +0200 From: Alain Frisch User-Agent: Mozilla/5.0 (X11; Linux i686 on x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.0 MIME-Version: 1.0 To: =?UTF-8?B?TWlsYW4gU3Rhbm9qZXZpxIc=?= , Caml List References: In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Subject: Re: [Caml-list] empty mli for executable On 10/03/2013 06:50 PM, Milan Stanojević wrote: > ocaml compiler executables have empty mlis with the following comment > (* > this "empty" file is here to speed up garbage collection in ocamlopt.opt > *) > > Can someone explain this in more detail? > How does empty interface lead to faster gc-ing? The empty interface implies that toplevel values computed by those modules don't need to be stored in the global symbol slots. Those slots are roots for the GC and are thus scanned every time it runs. The fewer global symbols, the quicker the GC will be. Well, this is the theory, I'd be really surprised if this materialized in a speed up which can be observed. Having an empty interface has a much more practical interest, in general: it allows the compiler to detect unused declarations in the implementation (if the corresponding warnings are enabled), and thus to reduce code rot. -- Alain