caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: forum@x9c.fr
To: caml-list@inria.fr
Subject: Re: [Caml-list] Tail calls in the JVM and the OCamlJava project
Date: Tue, 27 Jan 2009 09:36:23 +0100	[thread overview]
Message-ID: <1233045383.497ec787c70af@imp.ovh.net> (raw)
In-Reply-To: <200901262314.37183.jon@ffconsultancy.com>

Selon Jon Harrop <jon@ffconsultancy.com>:

>
> For anyone who missed it, there has been a very interesting development in
> JVM
> land. Arnold Schwaighofer claims to have the first working implementation of
> tail calls on the recently open sourced Hotspot Java compiler:
>
>   http://mail.openjdk.java.net/pipermail/mlvm-dev/2009-January/000331.html
>
> Given the existence of the OCamlJava project, this should be of great
> interest
> to the OCaml community because it might pave the way to even better numerical
> performance and easier parallelism with simple interop to rich libraries and
> so forth.

The work done around the Da Vinci machine
(http://openjdk.java.net/projects/mlvm/)
is clearly interesting for the future of the OCaml-Java project (and for almost
any compiler targeting the JVM). However, we have no evidence regarding the
'transfert rate' from the Da Vinci machine to the 'plain' JVM.

That being said, some other developments are needed before we get decent
performances from ocamljava-compiled code. Not trying to be exhaustive, I
would list:
  - tail calls (*);
  - garbage collector strategies better suited to functional languages (*);
  - some kind of 'method pointers' for efficient closure handling (*)
    cf. http://jcp.org/en/jsr/detail?id=292
  - a better memory model (**);
  - a better code generator (**);
  - more aggressive unboxing of values, like in ocamlopt (**).

Items marked by (*) are related to the JVM while those marked by (**) are
developments to be done on the OCaml-Java codebase. One chance for the
OCaml-Java project is that the hype around so-called scripting languages
seems to push Sun to design and integrate things that are useful to
OCaml-Java. Indeed, scripting languages and OCaml express some common
needs such as garbage collectors oriented towards short-lived objects,
or function/method pointers. Almost all that benefits to scripting
languages will also benefit to OCaml-Java.

Anyway, we will have to wait until JDK 7 (planned / hoped for late 2009)
to see some of these changes available for production. In the meantime,
I will have to find some time to work on OCaml-Java to correct its
deficiencies.


Xavier Clerc


  reply	other threads:[~2009-01-27  8:36 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-26 23:14 Jon Harrop
2009-01-27  8:36 ` forum [this message]
2009-01-27 14:11   ` [Caml-list] " Jon Harrop
2009-01-27 14:42     ` forum
2009-01-31  0:18     ` Jon Harrop

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=1233045383.497ec787c70af@imp.ovh.net \
    --to=forum@x9c.fr \
    --cc=caml-list@inria.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).