caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Philippe Wang <philippe.wang.lists@gmail.com>
To: Dario Teixeira <darioteixeira@yahoo.com>
Cc: caml-list@inria.fr, Philippe Wang <philippe.wang@lip6.fr>
Subject: Re: [Caml-list] OC4MC : OCaml for Multicore architectures
Date: Thu, 24 Sep 2009 16:38:06 +0200	[thread overview]
Message-ID: <4d1b2df20909240738g1ba80204ra8cd138ef5c58956@mail.gmail.com> (raw)
In-Reply-To: <613980.13877.qm@web111508.mail.gq1.yahoo.com>

On Thu, Sep 24, 2009 at 4:11 PM, Dario Teixeira <darioteixeira@yahoo.com> wrote:
> Hi,
>
> Cheers for the work you guys put into this project!  And I'd like to join
> the crowd that has questions, if I may:
>
> a) If I understand correctly, part of prerequisites for implementing the
>   new GC was cleaning up the excessive use of imperative constructs in
>   the compiler's tree.  Will the new tree be also more amenable to the
>   implementation of new language constructs such as GADTs?

Nope...
We wanted not to touch the code generator (or any other part of the
compiler). Eventually, we had to modify a very little bit the code
generator so that it does not compact too much the generated code.
That meant changing less than 10 lines of ml code.

> b) Could you quantify the performance penalty (if any) of using the new GC
>   in a single-thread context?  And should this penalty be significant, are
>   there provisions for a compile-time choice of which GC to use?

Very few programs that are not written with multicore in mind would
not be penalized.
I mean our GC is much much dumber than INRIA OCaml's one.
Our goal was to show it was possible to have good performance with
multicores for OCaml.
Maybe someday we'll find some time to optimize the GC, but it's likely
not very soon.

> c) Is there an understanding between you and the folks at INRIA concerning
>   the eventual merging of this code into the mainline tree?

Almost same answer as the previous one.
We have shown that it's possible to enjoy multicore for performance.
The changes over the whole runtime library are not easy to merge into
mainstream.

It is very important to know this : the runtime library is written in
C (and a little part is in ASM in order to have better performance...
but mainly because of the "foreign function interface" so there is no
way to ignore it). Its type system really sucks (comparing to
OCaml's). When you change a very little part, it will tell you that
you were wrong, but not with a hard-to-understand type error message :
it will be some tricky dirty segmentation fault, which can sometimes
that days or weeks, even months, to take down.


I guess that if INRIA decides to implement parallel threads
capability, they will have to make the runtime library ready (clean up
some global variables, tidy the code like remove compatibility.h and
such stuff) before thinking about the GC. This could take some time,
because it's not good to break everything at once. Then, if they have
finished this step, I would be confident that they could integrate an
awesome GC.
But that's only my personal opinion...

Oh, why they wouldn't take OC4MC? ... If I were them, I wouldn't. We
have probably broken some stuff such as Weak or Lazy, so there is no
chance to bootstrap with OC4MC. Well, I mean that it's better to
change INRIA's OCaml with all the lessons learnt than to try to fix
OC4MC such that it's fully compatible with latest version of INRIA
OCaml.

-- 
Philippe Wang
   mail@philippewang.info


  reply	other threads:[~2009-09-24 14:39 UTC|newest]

Thread overview: 64+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-22 21:30 Philippe Wang
2009-09-23 10:53 ` [Caml-list] " Goswin von Brederlow
2009-09-23 12:21   ` Jon Harrop
2009-09-23 13:00     ` Jon Harrop
2009-09-23 14:26       ` Philippe Wang
2009-09-24  0:21   ` Jon Harrop
2009-09-23 23:15     ` Philippe Wang
2009-09-24  0:05       ` Jon Harrop
2009-09-24  0:01         ` Philippe Wang
2009-09-24  1:47           ` Jon Harrop
2009-09-24  9:49             ` Richard Jones
2009-09-24 10:00               ` rixed
2009-09-24 10:40               ` Florian Hars
2009-09-24 11:45               ` Jon Harrop
2009-09-24 10:00             ` kcheung
2009-09-24 11:52               ` Jon Harrop
2009-09-24 11:55                 ` Rakotomandimby Mihamina
2009-09-24 12:11                 ` rixed
2009-09-24 15:58                   ` Jon Harrop
2009-09-24 12:39                 ` Stefano Zacchiroli
2009-09-24 13:09                   ` Jon Harrop
2009-09-24 16:49                     ` Richard Jones
2009-09-24 16:56                       ` Philippe Wang
2009-09-24 17:36                         ` Richard Jones
2009-09-24 19:39                         ` rixed
2009-09-24 21:09                       ` Jon Harrop
2009-09-24 21:26                         ` rixed
2009-09-25  4:07                         ` Jacques Garrigue
2009-09-25  7:32                           ` Hugo Ferreira
2009-09-25 10:17                             ` Jon Harrop
2009-09-25 13:04                               ` kcheung
2009-09-25 21:39                             ` Gerd Stolpmann
2009-09-25  9:33                           ` Philippe Wang
2009-09-25 21:39                           ` Jon Harrop
2009-09-26 16:55                             ` Jon Harrop
2009-09-25  8:08                         ` Stéphane Glondu
2009-09-25 15:05                     ` Xavier Leroy
2009-09-25 23:26                       ` Benjamin Canou
2009-09-26  0:45                         ` kcheung
2009-09-26  1:53                           ` Jon Harrop
2009-09-26 13:51                             ` kcheung
2009-09-26 14:46                               ` Jon Harrop
2009-10-10  4:01                         ` Jon Harrop
2009-09-24 13:40                   ` Rakotomandimby Mihamina
2009-09-24 14:22                     ` Philippe Wang
2009-09-24 14:49                     ` Stefano Zacchiroli
2009-09-24 13:55                   ` Mike Lin
2009-09-24 14:52                     ` Stefano Zacchiroli
2009-09-24 15:36                 ` Philippe Wang
2009-09-24 15:50                   ` Jon Harrop
2009-09-24 12:14             ` Philippe Wang
2009-09-24 13:11               ` Jon Harrop
2009-09-24 14:51                 ` Philippe Wang
2009-09-24 14:57       ` Philippe Wang
2009-09-24 14:11 ` Dario Teixeira
2009-09-24 14:38   ` Philippe Wang [this message]
2009-09-24 15:20     ` Dario Teixeira
2009-09-24 23:28     ` Jon Harrop
2009-09-24 23:25       ` Philippe Wang
2009-09-25 14:11       ` Philippe Wang
2009-11-08 18:12       ` Jon Harrop
2009-09-24 18:24 ` David Teller
     [not found] <20090924154716.BCD0ABC5A@yquem.inria.fr>
2009-09-24 16:02 ` Pascal Cuoq
2009-09-24 16:30   ` Philippe Wang

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=4d1b2df20909240738g1ba80204ra8cd138ef5c58956@mail.gmail.com \
    --to=philippe.wang.lists@gmail.com \
    --cc=caml-list@inria.fr \
    --cc=darioteixeira@yahoo.com \
    --cc=philippe.wang@lip6.fr \
    /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).