Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
Compiling Ocaml sources to c sources
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Eray Ozkural <examachine@g...>
Subject: Re: [Caml-list] Compiling Ocaml sources to c sources
Yes, I've seen how wired the GC is in the ocaml sources. I had used the
Boehm GC in a compiler project (not for the generated code but the
do you mean that one would have to disable most optimizations in the ocaml
compiler to make such a hypothetical bytecode-to-C compiler work with a C
GC, or am I missing something crucial? It's great to be able to learn from
ocaml compiler writers, BTW, your comments are much appreciated.


On Thu, Sep 16, 2010 at 12:05 PM, Fabrice Le Fessant <> wrote:

> The problem is still the same: even if the code is compiled by a C
> compiler, there is still the need for the garbage collector. If you
> don't provide your own conservative GC (for which you would have to
> reimplement all the native functions of OCaml), then you need to use
> OCaml GC, and you would have to disable most optimizations to be sure
> that the GC knows where to find live references. At the end, you would
> get almost no performance improvement, compared to just appending the
> assembly code for each bytecode instruction (see Piumarta's work in
> PLDI'98).
> --Fabrice
> Eray Ozkural wrote, On 09/16/2010 02:38 AM:
> > Well, what I would do is to apply a fully optimizing compiler from a
> > proper hardware abstraction layer, whether it is JIT is irrelevant, but
> > I do not see why the system would not start doing this as soon as the
> > code is loaded in some place (and not when it starts to run). What is
> > certain is that some simple transformation will not speed things up much.
> _______________________________________________
> Caml-list mailing list. Subscription management:
> Archives:
> Beginner's list:
> Bug reports:

Eray Ozkural, PhD candidate.  Comp. Sci. Dept., Bilkent University, Ankara