* [Caml-list] Ocaml 4.02.0: Dead Code Elimination and Core
@ 2014-09-01 12:58 Christopher Yocum
2014-09-01 13:14 ` Jeremie Dimino
0 siblings, 1 reply; 5+ messages in thread
From: Christopher Yocum @ 2014-09-01 12:58 UTC (permalink / raw)
To: caml-list
[-- Attachment #1: Type: text/plain, Size: 721 bytes --]
Hi Everyone,
I am not sure if this is the correct forum for this question but I thought
I would start here. I also have the feeling that this is a rather dumb
question. However, I will put it out there and see what the responses are.
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.
All the best,
Chris Yocum
[-- Attachment #2: Type: text/html, Size: 840 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Caml-list] Ocaml 4.02.0: Dead Code Elimination and Core
2014-09-01 12:58 [Caml-list] Ocaml 4.02.0: Dead Code Elimination and Core Christopher Yocum
@ 2014-09-01 13:14 ` Jeremie Dimino
2014-09-01 16:57 ` Chris Yocum
2014-09-04 15:03 ` Goswin von Brederlow
0 siblings, 2 replies; 5+ messages in thread
From: Jeremie Dimino @ 2014-09-01 13:14 UTC (permalink / raw)
To: Christopher Yocum; +Cc: caml-list
[-- Attachment #1: Type: text/plain, Size: 1033 bytes --]
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.
--
Jeremie
[-- Attachment #2: Type: text/html, Size: 1533 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Caml-list] Ocaml 4.02.0: Dead Code Elimination and Core
2014-09-01 13:14 ` Jeremie Dimino
@ 2014-09-01 16:57 ` Chris Yocum
2014-09-04 15:03 ` Goswin von Brederlow
1 sibling, 0 replies; 5+ messages in thread
From: Chris Yocum @ 2014-09-01 16:57 UTC (permalink / raw)
To: Jeremie Dimino; +Cc: caml-list
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.
Dear Jeremie,
Thank you very much for this. I look forward to seeing the new
version of Core. BTW, I just saw a blog post about this on the Jane
St. tech blog. I guess I should have done a bit more research before
sending this out.
All the best,
Chris
>
> --
> Jeremie
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Caml-list] Ocaml 4.02.0: Dead Code Elimination and Core
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
1 sibling, 1 reply; 5+ messages in thread
From: Goswin von Brederlow @ 2014-09-04 15:03 UTC (permalink / raw)
To: caml-list
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Caml-list] Ocaml 4.02.0: Dead Code Elimination and Core
2014-09-04 15:03 ` Goswin von Brederlow
@ 2014-09-05 20:55 ` Jacques Garrigue
0 siblings, 0 replies; 5+ messages in thread
From: Jacques Garrigue @ 2014-09-05 20:55 UTC (permalink / raw)
To: Goswin von Brederlow; +Cc: OCaml Mailing List
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
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-09-05 20:55 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-01 12:58 [Caml-list] Ocaml 4.02.0: Dead Code Elimination and Core 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 is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox