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=1.7 required=5.0 tests=AWL,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 mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by yquem.inria.fr (Postfix) with ESMTP id BA133BB84 for ; Tue, 27 Jan 2009 15:42:17 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AtMAAE6sfklbeRvklGdsb2JhbACTCH0BAQEBCQsICREDtkaFTA X-IronPort-AV: E=Sophos;i="4.37,332,1231110000"; d="scan'208";a="22093318" Received: from 25.mail-out.ovh.net ([91.121.27.228]) by mail3-smtp-sop.national.inria.fr with SMTP; 27 Jan 2009 15:42:16 +0100 Received: (qmail 6460 invoked by uid 503); 27 Jan 2009 14:42:38 -0000 Received: from b7.ovh.net (HELO mail364.ha.ovh.net) (213.186.33.57) by 25.mail-out.ovh.net with SMTP; 27 Jan 2009 14:42:38 -0000 Received: from b0.ovh.net (HELO queueout) (213.186.33.50) by b0.ovh.net with SMTP; 27 Jan 2009 14:42:16 -0000 Received: from ns0.ovh.net (HELO localhost) (213.186.33.20) by ns0.ovh.net with SMTP; 27 Jan 2009 14:42:16 -0000 Received: from 128.93.57.40 ([128.93.57.40]) by imp.ovh.net (IMP) with HTTP for ; Tue, 27 Jan 2009 15:42:16 +0100 Message-ID: <1233067336.497f1d48434cf@imp.ovh.net> Date: Tue, 27 Jan 2009 15:42:16 +0100 From: forum@x9c.fr To: caml-list@yquem.inria.fr Subject: Re: [Caml-list] Tail calls in the JVM and the OCamlJava project References: <200901262314.37183.jon@ffconsultancy.com> <1233045383.497ec787c70af@imp.ovh.net> <200901271411.23802.jon@ffconsultancy.com> In-Reply-To: <200901271411.23802.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: 2109936427189273567 X-Spam: no; 0.00; unboxing:01 ocamlopt:01 compilation:01 ocaml:01 compiler:01 unboxing:01 ocaml:01 2009:98 garbage:01 wrote:01 caml-list:01 tail:01 int:01 int:01 slower:02 Selon Jon Harrop : > On Tuesday 27 January 2009 08:36:23 forum@x9c.fr wrote: > > - more aggressive unboxing of values, like in ocamlopt (**). > > Can you elaborate on this? Surely boxing is no longer an issue thanks to JIT > compilation? I was refering to the fact that some OCaml values (such as int32, int64, int, float) could be mapped to Java primitive types, at least for intermediary results. As of today, the ocamljava compiler will use boxed representation for all but int values. Further, I think that the unboxing done for int values could be made more aggressive. As a result, numerous intermediate values are created and just dropped, which results not only in slower code but also in additional pressure on the garbage collector. Given that this boxing is not done via Java "wrapper" classes (but custom classes encoding OCaml values), it seems almost impossible that the JVM JIT optimizes this boxing. > On a related note, the new code generator in Mono 2.2 has made F# Mono as > fast > as OCaml on SciMark2. So a Mono backend might be a viable option. Sure. To me, any major virtual machine is a good candidate as a target. Moreover, Sun and Microsoft virtual machines are quite similar so there is no obvious reason why the work done for the JVM could not be done for dot net. Xavier Clerc