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

Selon Jon Harrop <jon@ffconsultancy.com>:

> 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



  reply	other threads:[~2009-01-27 14:42 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 ` [Caml-list] " forum
2009-01-27 14:11   ` Jon Harrop
2009-01-27 14:42     ` forum [this message]
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=1233067336.497f1d48434cf@imp.ovh.net \
    --to=forum@x9c.fr \
    --cc=caml-list@yquem.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).