From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id EA329BDCB for ; Fri, 9 Sep 2005 17:01:27 +0200 (CEST) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id j89F1R3k006287 for ; Fri, 9 Sep 2005 17:01:27 +0200 Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id RAA07660 for ; Fri, 9 Sep 2005 17:01:26 +0200 (MET DST) Received: from smtpout.mac.com (smtpout.mac.com [17.250.248.46]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id j89F1PfX006282 for ; Fri, 9 Sep 2005 17:01:26 +0200 Received: from mac.com (smtpin07-en2 [10.13.10.152]) by smtpout.mac.com (Xserve/8.12.11/smtpout10/MantshX 4.0) with ESMTP id j89F1MKV010083; Fri, 9 Sep 2005 08:01:23 -0700 (PDT) Received: from [10.0.2.5] (dsl092-032-215.lax1.dsl.speakeasy.net [66.92.32.215]) (authenticated bits=0) by mac.com (Xserve/smtpin07/MantshX 4.0) with ESMTP id j89F1LcY009521 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NO); Fri, 9 Sep 2005 08:01:22 -0700 (PDT) In-Reply-To: <200509090622.58156.jon@ffconsultancy.com> References: <200509090622.58156.jon@ffconsultancy.com> Mime-Version: 1.0 (Apple Message framework v734) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <626610B4-6781-4FE9-B1A9-A8B37CB5391A@mac.com> Cc: caml-list@inria.fr Content-Transfer-Encoding: 7bit From: Paul Snively Subject: Re: [Caml-list] Compiling to OCaml bytecode Date: Fri, 9 Sep 2005 08:01:01 -0700 To: Jon Harrop X-Pgp-Agent: GPGMail 1.1.1 (Tiger) X-Gpgmail-State: signed X-Mailer: Apple Mail (2.734) X-Miltered: at nez-perce with ID 4321A3C7.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at nez-perce with ID 4321A3C5.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 ocaml:01 bytecode:01 hash:01 ocaml's:01 bytecode:01 compiler:01 ocaml:01 ocaml's:01 oops:01 metaocaml:01 dynlink:01 loadfile:01 cmo:01 metaocaml:01 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.3 -----BEGIN PGP SIGNED MESSAGE----- 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 . > Does the OCaml distribution expose everything needed to do this? No. > 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 want. > 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 > http://www.ffconsultancy.com/products/ocaml_for_scientists > > _______________________________________________ > Caml-list mailing list. Subscription management: > http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list > Archives: http://caml.inria.fr > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners > Bug reports: http://caml.inria.fr/bin/caml-bugs Best regards, Paul -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (Darwin) iEYEARECAAYFAkMho78ACgkQO3fYpochAqIdUACgxu7XGJfX8IkS32rSc1FlUPQQ NacAn1D9+RGTJbfwxT/J2Fh8h51/YOw3 =3VZS -----END PGP SIGNATURE-----