On Wed, Sep 15, 2010 at 8:36 PM, Jon Harrop <jonathandeanharrop@googlemail.com> wrote:
>   * Hacking a C generator inside Ocaml is non-trivial, because of the
>     garbage collector, currified function calls, and tail recursion
>     etc.

BTW, I was always surprised nobody had converted the bytecode interpreter
into a via-C compiler by unwinding the C code the interpreter goes through
to execute a specific OCaml bytecode program. You could even use this with
something like Clang to get JIT compilation to native code. Not very
efficient but surely much faster than interpreted bytecode...

Hmm, this would only optimize the bytecode fetch/decode step of the ocaml execution cycle. I am not sure that it will result in much real-world speedup.

In fact, that seems to be the main problem with many of these so-called JIT interpreters, which in my opinion, do not seem to have learnt from the HAL architectures of IBM OS's etc. Was probably also the problem with Transmeta; cheap compilation entails cheap performance.

Best,

--
Eray Ozkural, PhD candidate.  Comp. Sci. Dept., Bilkent University, Ankara
http://groups.yahoo.com/group/ai-philosophy
http://myspace.com/arizanesil http://myspace.com/malfunct