caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: "Mikkel Fahnøe Jørgensen" <mikkel@dvide.com>
To: Jon Harrop <jon@ffconsultancy.com>
Cc: "O'Caml Mailing List" <caml-list@yquem.inria.fr>
Subject: Re: [Caml-list] JIT compilation of OCaml's bytecode
Date: Sun, 25 Jan 2009 09:27:23 +0100	[thread overview]
Message-ID: <caee5ad80901250027r2c487a67wd4ac9704143a9122@mail.gmail.com> (raw)
In-Reply-To: <200901250521.16361.jon@ffconsultancy.com>

2009/1/25 Jon Harrop <jon@ffconsultancy.com>:
>
> AFAIK, OCaml's bytecode is typeless. How hard would it be to infer types from
> the bytecode in order to create type-specific functions during JIT
> compilation?

I assume you have already studied the other ocamljit approach
http://cristal.inria.fr/~starynke/ocamljit.html

Regarding types in bytecode, I don't know, but perhaps it is
worthwhile looking at Javascript (and possibly Lua) jitters. Recent
advances in trace-trees does with dynamic type detection along
execution paths. I suspect the polymorphic typing of ocaml requires a
kind of typeless compilation otherwise it would not be possible to be
polymorphic. Tracetrees would then be able to runtime optimize
specific applications of this polymorphism and possibly do better than
a static compiler in this area. However, since OCaml is relying so
much on a predictable data structure layout I suspect it would be hard
work to seriously optimize. Javascript optimizers do tend to realize
that hash tables often behave as objects and can optimize this special
case though.

http://ejohn.org/blog/tracemonkey/
http://www.ics.uci.edu/%7Efranz/Site/pubs-pdf/ICS-TR-06-16.pdf

Mikkel


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

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-25  5:21 Jon Harrop
2009-01-25  8:27 ` Mikkel Fahnøe Jørgensen [this message]

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=caee5ad80901250027r2c487a67wd4ac9704143a9122@mail.gmail.com \
    --to=mikkel@dvide.com \
    --cc=caml-list@yquem.inria.fr \
    --cc=jon@ffconsultancy.com \
    /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).