English version
Accueil propos Tlchargement Ressources Contactez-nous

Ce site est rarement mis jour. Pour les informations les plus rcentes, rendez-vous sur le nouveau site OCaml l'adresse ocaml.org.

Browse thread
JIT compilation of OCaml's bytecode
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2009-01-25 (08:27)
From: Mikkel_Fahnøe_Jørgensen <mikkel@d...>
Subject: Re: [Caml-list] JIT compilation of OCaml's bytecode
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

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.