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 970227FACB for ; Fri, 5 Sep 2014 22:55:57 +0200 (CEST) Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of garrigue@math.nagoya-u.ac.jp) identity=pra; client-ip=133.6.130.5; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="garrigue@math.nagoya-u.ac.jp"; x-sender="garrigue@math.nagoya-u.ac.jp"; x-conformance=sidf_compatible Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of garrigue@math.nagoya-u.ac.jp) identity=mailfrom; client-ip=133.6.130.5; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="garrigue@math.nagoya-u.ac.jp"; x-sender="garrigue@math.nagoya-u.ac.jp"; x-conformance=sidf_compatible Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@mailhost.math.nagoya-u.ac.jp) identity=helo; client-ip=133.6.130.5; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="garrigue@math.nagoya-u.ac.jp"; x-sender="postmaster@mailhost.math.nagoya-u.ac.jp"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AkwBAAEiClSFBoIFl2dsb2JhbABaFoNKV8kOh0wBgR4QAQEBAQEIFgc9hAMBAQQBOgYDATUBAQMLCxguITYGE4guAwkHBQmpCIYAAolLDVeGAwEQAQaNIIF6MweDL4EdmmGCEIc8hzGKHGoBAYJNAQEB X-IPAS-Result: AkwBAAEiClSFBoIFl2dsb2JhbABaFoNKV8kOh0wBgR4QAQEBAQEIFgc9hAMBAQQBOgYDATUBAQMLCxguITYGE4guAwkHBQmpCIYAAolLDVeGAwEQAQaNIIF6MweDL4EdmmGCEIc8hzGKHGoBAYJNAQEB X-IronPort-AV: E=Sophos;i="5.04,475,1406584800"; d="scan'208";a="93251340" Received: from rabbit.math.nagoya-u.ac.jp (HELO mailhost.math.nagoya-u.ac.jp) ([133.6.130.5]) by mail2-smtp-roc.national.inria.fr with ESMTP; 05 Sep 2014 22:55:55 +0200 Received: from mailhost.math.nagoya-u.ac.jp (localhost [127.0.0.1]) by mailhost.math.nagoya-u.ac.jp (Postfix) with ESMTP id C0AFC63BD; Sat, 6 Sep 2014 05:55:51 +0900 (JST) Received: from mailhost.math.nagoya-u.ac.jp (localhost [127.0.0.1]) by mailhost.math.nagoya-u.ac.jp (Postfix) with ESMTP id 275A1413A; Sat, 6 Sep 2014 05:55:51 +0900 (JST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=math.nagoya-u.ac.jp; h= subject:mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; s=alpha; bh=UIHdgCWUXbhuJHka7h+XdyPcZH0=; b=V8SRe8X+HcTE1Oblst5DIh7DgMWO gEkLhO/RzIUHme07Gu3M4GJmGNidvElENUlWHl1sPOT/hXCqcx1MAAieblH9D6kr tYZf+pkpwKp5zTH+GOtAaixb77f6fMsjO1xhYAM3givgBr6S7P6OVYkGWiGUuhMP KDup36AkomF4UdY= DomainKey-Signature: a=rsa-sha1; h=Received:Subject:Mime-Version:Content-Type:From:In-Reply-To:Date:Cc:Content-Transfer-Encoding:Message-Id:References:To:X-Mailer; b=WMhsDjkzXKEg9tDIlp9DzyUpikk1ZS+iWS1FbYpOCraOzAObttpwbk9Caa8MuRYmofgHIN45ox1X8jYjMvCD/vsYEWnJyB/saNE/E/2rh5k6lLJV5noTDRxXD3E+8nezANaY2Gnz/57b1eYmCyF6jivi+9QhkEC7XyNlcE/RBwM=; c=nofws; d=math.nagoya-u.ac.jp; q=dns; s=alpha Received: from [192.168.0.85] (81-229-79-21-no64.business.telia.com [81.229.79.21]) by mailhost.math.nagoya-u.ac.jp (Postfix) with ESMTPSA id 5CEA14123; Sat, 6 Sep 2014 05:55:47 +0900 (JST) Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Content-Type: text/plain; charset=us-ascii From: Jacques Garrigue In-Reply-To: <20140904150325.GC13007@frosties> Date: Fri, 5 Sep 2014 22:55:43 +0200 Cc: OCaml Mailing List Content-Transfer-Encoding: quoted-printable Message-Id: <4FA040E3-A419-44E7-97E5-69D3D3E7190A@math.nagoya-u.ac.jp> References: <20140904150325.GC13007@frosties> To: Goswin von Brederlow X-Mailer: Apple Mail (2.1878.6) Subject: Re: [Caml-list] Ocaml 4.02.0: Dead Code Elimination and Core On 2014/09/04 17:03, Goswin von Brederlow wrote: > On Mon, Sep 01, 2014 at 02:14:28PM +0100, Jeremie Dimino wrote: >> Hi Christopher, >>=20 >> On Mon, Sep 1, 2014 at 1:58 PM, Christopher Yocum wro= te: >>=20 >>> 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. S= o, 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. >>>=20 >>=20 >> 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. >>=20 >> 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. >=20 > 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. >=20 > Note: an example using oasis would be the best. :) >=20 > MfG > Goswin I just gave a presentation at the ML workshop about that. There is no oasis code, but the slides explain well how to call the compile= r, and the impact on dependencies. http://www.math.nagoya-u.ac.jp/~garrigue/papers/index.html Jacques=