* JIT compilation of OCaml's bytecode
@ 2009-01-25 5:21 Jon Harrop
2009-01-25 8:27 ` [Caml-list] " Mikkel Fahnøe Jørgensen
0 siblings, 1 reply; 2+ messages in thread
From: Jon Harrop @ 2009-01-25 5:21 UTC (permalink / raw)
To: O'Caml Mailing List
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?
--
Dr Jon Harrop, Flying Frog Consultancy Ltd.
http://www.ffconsultancy.com/?e
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [Caml-list] JIT compilation of OCaml's bytecode
2009-01-25 5:21 JIT compilation of OCaml's bytecode Jon Harrop
@ 2009-01-25 8:27 ` Mikkel Fahnøe Jørgensen
0 siblings, 0 replies; 2+ messages in thread
From: Mikkel Fahnøe Jørgensen @ 2009-01-25 8:27 UTC (permalink / raw)
To: Jon Harrop; +Cc: O'Caml Mailing List
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-01-25 8:27 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-01-25 5:21 JIT compilation of OCaml's bytecode Jon Harrop
2009-01-25 8:27 ` [Caml-list] " Mikkel Fahnøe Jørgensen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox