From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr 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 022547FACB for ; Thu, 4 Sep 2014 17:06:30 +0200 (CEST) Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of goswin-v-b@web.de) identity=pra; client-ip=212.227.15.14; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="goswin-v-b@web.de"; x-sender="goswin-v-b@web.de"; x-conformance=sidf_compatible Received-SPF: Pass (mail2-smtp-roc.national.inria.fr: domain of goswin-v-b@web.de designates 212.227.15.14 as permitted sender) identity=mailfrom; client-ip=212.227.15.14; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="goswin-v-b@web.de"; x-sender="goswin-v-b@web.de"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@mout.web.de) identity=helo; client-ip=212.227.15.14; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="goswin-v-b@web.de"; x-sender="postmaster@mout.web.de"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AowCACx/CFTU4w8OnGdsb2JhbABZhDfKCIVvAYEFFhABAQEBAQYNCQkUKYQEAQU6TwsYCSUPBQ0bNIgtAQMVtU4fKw2GWgEXjSCCNBaDGYEdBZpcgg+HIhOHNoobaoJPAQEB X-IPAS-Result: AowCACx/CFTU4w8OnGdsb2JhbABZhDfKCIVvAYEFFhABAQEBAQYNCQkUKYQEAQU6TwsYCSUPBQ0bNIgtAQMVtU4fKw2GWgEXjSCCNBaDGYEdBZpcgg+HIhOHNoobaoJPAQEB X-IronPort-AV: E=Sophos;i="5.04,466,1406584800"; d="scan'208";a="93045200" Received: from mout.web.de ([212.227.15.14]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-SHA; 04 Sep 2014 17:03:26 +0200 Received: from frosties.localnet ([78.43.112.61]) by smtp.web.de (mrweb002) with ESMTPSA (Nemesis) id 0MFcPd-1Xe4cN03HB-00EfZN for ; Thu, 04 Sep 2014 17:03:26 +0200 Received: from mrvn by frosties.localnet with local (Exim 4.82) (envelope-from ) id 1XPYZJ-0003iS-E6 for caml-list@inria.fr; Thu, 04 Sep 2014 17:03:25 +0200 Date: Thu, 4 Sep 2014 17:03:25 +0200 From: Goswin von Brederlow To: caml-list@inria.fr Message-ID: <20140904150325.GC13007@frosties> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-Provags-ID: V03:K0:rc4Mojs1xFBxI3TO7htGWWawh5Cj7UjRdZ6fMTH3KabO3cwifm/ mZchiDyZXb5hTtIPMthrgGUCf6InrnCmEVhNWf+5wJW4qhCb0luK98NfGZrWWOwBdm4Taf7 u71l71yB/zDeP1VWAMfT5ETCBDuYgniJd2v7MF1UG5NX+QzLiD6OriPC8la99GiaDwsFsyJ eJJn7uoZx4B/wEx/mO9dA== X-UI-Out-Filterresults: notjunk:1; Subject: Re: [Caml-list] Ocaml 4.02.0: Dead Code Elimination and Core On Mon, Sep 01, 2014 at 02:14:28PM +0100, Jeremie Dimino wrote: > Hi Christopher, > > On Mon, Sep 1, 2014 at 1:58 PM, Christopher Yocum wrote: > > > I saw that there is dead code elimination in 4.02.0 and I thought to > > myself that this would help make Core's very large binaries smaller. So, I > > switch compilers and did a test. Unfortunately, a small sample program > > compiled with ocamlopt and using Core.Std.List was still 11MB. I very much > > doubt that my binary really needs to be 11MB. Is there a way to shrink the > > size? I had heard about namesapces elsewhere before but I think that > > discussion died. > > > > AFAIK 4.02 doesn't do much more dead code elimination than 4.01. There is > an entry about dead code elimination in the changelog but it is a local > optimization that is unlikely to change the size of binaries much. > > However there is a new feature of 4.02 that will help reduce the size of > binaries using Core: module aliases. Core will have to be updated to take > advantage of it. We are hopping to release a new version of Core using > module aliases soon. Could you (or someone else) give an example of how to use module aliases? Core isn't the only library that would benefit from this and a good example would help getting started converting to it. Note: an example using oasis would be the best. :) MfG Goswin