From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: ** X-Spam-Status: No, score=2.0 required=5.0 tests=NO_REAL_NAME,SPF_SOFTFAIL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by yquem.inria.fr (Postfix) with ESMTP id 374FBBB84 for ; Tue, 27 Jan 2009 09:36:04 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AtUAAD9WfklbeRvklGdsb2JhbACTBH8BAQEBCQsICREDtUqFSw X-IronPort-AV: E=Sophos;i="4.37,331,1231110000"; d="scan'208";a="23117416" Received: from 25.mail-out.ovh.net ([91.121.27.228]) by mail1-smtp-roc.national.inria.fr with SMTP; 27 Jan 2009 09:36:04 +0100 Received: (qmail 17979 invoked by uid 503); 27 Jan 2009 08:36:26 -0000 Received: from b7.ovh.net (HELO mail332.ha.ovh.net) (213.186.33.57) by 25.mail-out.ovh.net with SMTP; 27 Jan 2009 08:36:26 -0000 Received: from b0.ovh.net (HELO queueout) (213.186.33.50) by b0.ovh.net with SMTP; 27 Jan 2009 08:36:23 -0000 Received: from ns0.ovh.net (HELO localhost) (213.186.33.20) by ns0.ovh.net with SMTP; 27 Jan 2009 08:36:23 -0000 Received: from 128.93.57.40 ([128.93.57.40]) by imp.ovh.net (IMP) with HTTP for ; Tue, 27 Jan 2009 09:36:23 +0100 Message-ID: <1233045383.497ec787c70af@imp.ovh.net> Date: Tue, 27 Jan 2009 09:36:23 +0100 From: forum@x9c.fr To: caml-list@inria.fr Subject: Re: [Caml-list] Tail calls in the JVM and the OCamlJava project References: <200901262314.37183.jon@ffconsultancy.com> In-Reply-To: <200901262314.37183.jon@ffconsultancy.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit User-Agent: Internet Messaging Program (IMP) 3.2.6 X-Originating-IP: 128.93.57.40 X-Ovh-Tracer-Id: 14377460336981771040 X-Spam: no; 0.00; compiler:01 ocaml:01 parallelism:01 interop:01 compiler:01 model:01 unboxing:01 ocamlopt:01 ocaml:01 pointers:01 hotspot:98 2009:98 2009:98 garbage:01 garbage:01 Selon Jon Harrop : > > 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