<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE message PUBLIC
  "-//MLarc//DTD MLarc output files//EN"
  "../../mlarc.dtd"[
  <!ATTLIST message
    listname CDATA #REQUIRED
    title CDATA #REQUIRED
  >
]>

  <?xml-stylesheet href="../../mlarc.xsl" type="text/xsl"?>


<message 
  url="2009/01/fc0d9042cca25bef993a5587344ce940"
  from="Mikkel_Fahnøe_Jørgensen &lt;mikkel@d...&gt;"
  author="Mikkel_Fahnøe_Jørgensen"
  date="2009-01-25T08:27:24"
  subject="Re: [Caml-list] JIT compilation of OCaml&apos;s bytecode"
  prev="2009/01/4ed490718e7f3fa7b1ab4ad1c56629c6"
  next="2009/01/c7f580f7f451eaee61c748f535dfba96"
  prev-in-thread="2009/01/4ed490718e7f3fa7b1ab4ad1c56629c6"
  prev-thread="2009/01/a7ff6f96420ea126da027e3f06d95313"
  next-thread="2009/01/9912c0d7556d1bea5bb7d407674e98fb"
  root="../../"
  period="month"
  listname="caml-list"
  title="Archives of the Caml mailing list">

<thread subject="JIT compilation of OCaml&apos;s bytecode">
<msg 
  url="2009/01/4ed490718e7f3fa7b1ab4ad1c56629c6"
  from="Jon Harrop &lt;jon@f...&gt;"
  author="Jon Harrop"
  date="2009-01-25T05:17:19"
  subject="JIT compilation of OCaml&apos;s bytecode">
<msg 
  url="2009/01/fc0d9042cca25bef993a5587344ce940"
  from="Mikkel_Fahnøe_Jørgensen &lt;mikkel@d...&gt;"
  author="Mikkel_Fahnøe_Jørgensen"
  date="2009-01-25T08:27:24"
  subject="Re: [Caml-list] JIT compilation of OCaml&apos;s bytecode">
</msg>
</msg>
</thread>

<contents>
2009/1/25 Jon Harrop &lt;jon@ffconsultancy.com&gt;:
&gt;
&gt; AFAIK, OCaml's bytecode is typeless. How hard would it be to infer types from
&gt; the bytecode in order to create type-specific functions during JIT
&gt; 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

</contents>

</message>

