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 B22FC7FACB for ; Mon, 1 Sep 2014 15:14:32 +0200 (CEST) Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of jdimino@janestreet.com) identity=pra; client-ip=38.105.200.233; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="jdimino@janestreet.com"; x-sender="jdimino@janestreet.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail2-smtp-roc.national.inria.fr: domain of jdimino@janestreet.com designates 38.105.200.233 as permitted sender) identity=mailfrom; client-ip=38.105.200.233; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="jdimino@janestreet.com"; x-sender="jdimino@janestreet.com"; 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@mxout4.mail.janestreet.com) identity=helo; client-ip=38.105.200.233; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="jdimino@janestreet.com"; x-sender="postmaster@mxout4.mail.janestreet.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApUBADhwBFQmacjpnGdsb2JhbABZhDcEgnjEfQGHVQGBCwgWEAEBAQEBCBQJPYQEAQEDARIRHQEBNwEECwsEAQYDNAICIQESAQUBHAYTIogMAwkIA5kMa4ozeIUCAQWJZw2FZQERBgqNFoItB4I4DzISgUGaUYIQhzeHMIRFGCmFE2uCTwEBAQ X-IPAS-Result: ApUBADhwBFQmacjpnGdsb2JhbABZhDcEgnjEfQGHVQGBCwgWEAEBAQEBCBQJPYQEAQEDARIRHQEBNwEECwsEAQYDNAICIQESAQUBHAYTIogMAwkIA5kMa4ozeIUCAQWJZw2FZQERBgqNFoItB4I4DzISgUGaUYIQhzeHMIRFGCmFE2uCTwEBAQ X-IronPort-AV: E=Sophos;i="5.04,442,1406584800"; d="scan'208";a="92485489" Received: from mxout4.mail.janestreet.com ([38.105.200.233]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-SHA; 01 Sep 2014 15:14:30 +0200 Received: from tot-oib-smtp1.delacy.com ([172.27.22.15] helo=tot-smtp) by mxout4.mail.janestreet.com with esmtps (UNKNOWN:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.82) (envelope-from ) id 1XORRF-00071a-AV for caml-list@inria.fr; Mon, 01 Sep 2014 09:14:29 -0400 Received: from [172.27.229.230] (helo=mxgoog1.mail.janestreet.com) by tot-smtp with esmtps (UNKNOWN:AES256-GCM-SHA384:256) (Exim 4.72) (envelope-from ) id 1XORRF-0005Sm-7e for caml-list@inria.fr; Mon, 01 Sep 2014 09:14:29 -0400 Received: from mail-ie0-f174.google.com ([209.85.223.174]) by mxgoog1.mail.janestreet.com with esmtps (TLSv1:RC4-SHA:128) (Exim 4.72) (envelope-from ) id 1XORRF-0005l8-3g for caml-list@inria.fr; Mon, 01 Sep 2014 09:14:29 -0400 Received: by mail-ie0-f174.google.com with SMTP id at20so5878942iec.5 for ; Mon, 01 Sep 2014 06:14:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=janestreet.com; s=google; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=0y+XYfXaDHJBS3ThcQDjghQRup+4krn2gu1igbDP5yM=; b=BNuZqb86t9NYFtrBwmQmiidUnDpXqcsjqyS/p1GcbrEVMhMSebzNqnR3E69A32sRWZ Uz7OnAJXhdNCxDG1jmJUyLY9Zj1csVvJKHCYGAoDkuW7tLAqzlMVv4QE4bGjpiUifnGk 75fRPUy1hIo2hEq2Sp8zYdlS6hIt+galKL5Dg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=0y+XYfXaDHJBS3ThcQDjghQRup+4krn2gu1igbDP5yM=; b=IS5eIw40C8STWyYXx+x4GAY+QCS5m2mWjVCDxkQMp9XEayOL03t5gOdyG2z1tnvu/Z nq9+wPhoGP5J3zP9FtXa5WBb6eV8yRveQQpLyrH+oP4/EzGVZwOw23lc1K6TjJetXeAh bLJvpPHY3Ssj55Fs3QEilbcXyqfQ3Rcj0JywxPf8GKv6Y6u9Dh0BDrumAErvjN5n/y3L bdqVH2xA/cTtrPuMMzZwtiU638WvG9H7hf2cPwNeHD1iAPn7xj0m4sIrA25pl6YluYUA YpH5mjPLzDSMmVYzmsHADXmkUKuGXvpOqw/FEYX1W6+qodS1qBxTlG4yBGV9Us0MKhsC XOSQ== X-Gm-Message-State: ALoCoQlVtYErcMOQoix7MoRn3BXbfpGmky58EdEPReMKmz1YOU5sqrdH9AqOp2x0cPsT7vOFanmbacUAOv3riFq7gAye/9gni0ctXp2yZdx73X6hJZmEPbi2HGF4m5RRjX8VJ68XAqoi X-Received: by 10.50.143.65 with SMTP id sc1mr21097278igb.19.1409577268733; Mon, 01 Sep 2014 06:14:28 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.50.143.65 with SMTP id sc1mr21097263igb.19.1409577268573; Mon, 01 Sep 2014 06:14:28 -0700 (PDT) Received: by 10.50.241.14 with HTTP; Mon, 1 Sep 2014 06:14:28 -0700 (PDT) In-Reply-To: References: Date: Mon, 1 Sep 2014 14:14:28 +0100 Message-ID: From: Jeremie Dimino To: Christopher Yocum Cc: "caml-list@inria.fr" Content-Type: multipart/alternative; boundary=001a1135fdaa60bd6f050200c82a Subject: Re: [Caml-list] Ocaml 4.02.0: Dead Code Elimination and Core --001a1135fdaa60bd6f050200c82a Content-Type: text/plain; charset=UTF-8 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. -- Jeremie --001a1135fdaa60bd6f050200c82a Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi Christopher,

<= div class=3D"gmail_quote">On Mon, Sep 1, 2014 at 1:58 PM, Christopher Yocum= <cyocum@gmail.com> wrote:
I saw that there is de= ad code elimination in 4.02.0 and I thought to myself that this would help = make Core's very large binaries smaller. =C2=A0So, I switch compilers a= nd did a test. =C2=A0Unfortunately, a small sample program compiled with oc= amlopt and using Core.Std.List was still 11MB. =C2=A0I very much doubt that= my binary really needs to be 11MB. =C2=A0Is there a way to shrink the size= ? =C2=A0I had heard about namesapces elsewhere before but I think that disc= ussion died.

AFAIK 4.02 doesn't do much more dead code elimination tha= n 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 the= re is a new feature of 4.02 that will help reduce the size of binaries usin= g Core: module aliases. Core will have to be updated to take advantage of i= t. We are hopping to release a new version of Core using module aliases soo= n.

--
Jeremie
--001a1135fdaa60bd6f050200c82a--