From: Jacques Garrigue <garrigue@math.nagoya-u.ac.jp>
To: Goswin von Brederlow <goswin-v-b@web.de>
Cc: OCaml Mailing List <caml-list@inria.fr>
Subject: Re: [Caml-list] Ocaml 4.02.0: Dead Code Elimination and Core
Date: Fri, 5 Sep 2014 22:55:43 +0200 [thread overview]
Message-ID: <4FA040E3-A419-44E7-97E5-69D3D3E7190A@math.nagoya-u.ac.jp> (raw)
In-Reply-To: <20140904150325.GC13007@frosties>
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,
>>
>> On Mon, Sep 1, 2014 at 1:58 PM, Christopher Yocum <cyocum@gmail.com> 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
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 compiler,
and the impact on dependencies.
http://www.math.nagoya-u.ac.jp/~garrigue/papers/index.html
Jacques
prev parent reply other threads:[~2014-09-05 20:55 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-01 12:58 Christopher Yocum
2014-09-01 13:14 ` Jeremie Dimino
2014-09-01 16:57 ` Chris Yocum
2014-09-04 15:03 ` Goswin von Brederlow
2014-09-05 20:55 ` Jacques Garrigue [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4FA040E3-A419-44E7-97E5-69D3D3E7190A@math.nagoya-u.ac.jp \
--to=garrigue@math.nagoya-u.ac.jp \
--cc=caml-list@inria.fr \
--cc=goswin-v-b@web.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).