Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
Compiling to OCaml bytecode
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2005-09-09 (15:01)
From: Paul Snively <psnively@m...>
Subject: Re: [Caml-list] Compiling to OCaml bytecode
Hash: SHA1

Hi Jon!

First: I love the book. :-)

On Sep 8, 2005, at 10:22 PM, Jon Harrop wrote:

> I am interested in improving the performance of a simple term-level
> interpreter. As OCaml's bytecode is so fast, I'd like to replace the
> interpreter with a JIT compiler that compiles to OCaml bytecode and  
> then uses
> OCaml's bytecode interpreter to execute the generated code  
> efficiently and
> handle the results.
Sounds like <> to me, or maybe even <http://>.

> Does the OCaml distribution expose everything needed to do this?


> I assume the
> Dynlink module is where I should be looking. I've never used it  
> before but it
> looks as though it only loads from file (the "loadfile" function),  
> so I'd
> have to compile to a .cmo file and load that. What is the easiest  
> way to
> recover the result? If the necessary functionality is not already  
> exposed,
> could it and/or what are the odds that it will be added?
I really do think either Dynamic Caml or MetaOCaml will be what you  

> Also, is a bytecode-compiled JIT bytecode compiler likely to  
> outperform a
> native-code-compiled term-level interpreter? I assume the JIT  
> compiler would
> itself need to be compiled to bytecode in order to provide the  
> bytecode
> interpreter for the generated code.
"What happens when you try it?" ;-)

> -- 
> Dr Jon D Harrop, Flying Frog Consultancy Ltd.
> Objective CAML for Scientists
> _______________________________________________
> Caml-list mailing list. Subscription management:
> Archives:
> Beginner's list:
> Bug reports:

Best regards,

Version: GnuPG v1.4.1 (Darwin)