From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.9 required=5.0 tests=AWL,SPF_NEUTRAL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from discorde.inria.fr (discorde.inria.fr [192.93.2.38]) by yquem.inria.fr (Postfix) with ESMTP id 35019BC69 for ; Wed, 15 Aug 2007 15:20:52 +0200 (CEST) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.169]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id l7FDKpbA027316 for ; Wed, 15 Aug 2007 15:20:52 +0200 Received: by ug-out-1314.google.com with SMTP id o2so155903uge for ; Wed, 15 Aug 2007 06:20:51 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:in-reply-to:references:mime-version:content-type:message-id:cc:content-transfer-encoding:from:subject:date:to:x-mailer; b=BIJg/ewBtKuslpIO9ZBGFhJ82ufNxoePOeZpPRCU7vEvMH5/KvcTAzr2mbYW1x99PU7xz1daHfIF1O4R3QTVOkS4A3w/Ltlv2g/rSxgK2vjF/SqB3MkTKq4lmQuR6IASJmf0bdvjPQAZ+wPyB53FXiWMaj2ShM11snLQKf2kI5o= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:in-reply-to:references:mime-version:content-type:message-id:cc:content-transfer-encoding:from:subject:date:to:x-mailer; b=YEtbN9KVhNzQ3sz7bDVKPOtw6AeVSC7Khjw/UDBoa7NPgeuJ7cjIAagbtEPSJao00LgIJYlvOyxrZjghU+UUYzGtDlfT0/y677Z2JGXxUbq6cLx+xfySckRSIfnMvkygkPHtIeKaTVd3cecZf33/E/xRBv9Fgs0mtaM4SCHa1lQ= Received: by 10.67.15.15 with SMTP id s15mr1432300ugi.1187184051337; Wed, 15 Aug 2007 06:20:51 -0700 (PDT) Received: from ?192.168.1.33? ( [83.33.68.230]) by mx.google.com with ESMTPS id d24sm7160792nfh.2007.08.15.06.20.49 (version=SSLv3 cipher=OTHER); Wed, 15 Aug 2007 06:20:49 -0700 (PDT) In-Reply-To: <200708151401.41091.jon@ffconsultancy.com> References: <2B9157A5-ECA0-46EE-B628-840689224ACC@gmail.com> <200708151401.41091.jon@ffconsultancy.com> Mime-Version: 1.0 (Apple Message framework v752.3) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: Cc: caml-list@yquem.inria.fr Content-Transfer-Encoding: 7bit From: Joel Reymont Subject: Re: [Caml-list] High-performance bytecode interpreter in OCaml Date: Wed, 15 Aug 2007 14:20:34 +0100 To: Jon Harrop X-Mailer: Apple Mail (2.752.3) X-j-chkmail-Score: MSGID : 46C2FDB3.001 on discorde : j-chkmail score : XXX : 5/20 1 0.000 -> 3 X-Miltered: at discorde with ID 46C2FDB3.001 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; bytecode:01 ocaml:01 bytecode:01 compiler:01 ocaml:01 compilation:01 2007,:98 wrote:01 caml-list:01 cps:02 optimizing:03 naive:03 dependent:04 evaluating:06 meant:06 I have an existing bytecode file that I need to execute. The bytecode is produced by some other compiler. Does this change anything? I'm not sure if a term-level interpreter or rewriter applies in this scenario. As for CPS, what I meant is implementing each bytecode instruction as a function that takes a continuation (next instruction?). Thanks, Joel On Aug 15, 2007, at 2:01 PM, Jon Harrop wrote: > The performance of interpreters is heavily dependent upon what > exactly you're > evaluating (both language and program properties). If you start > with a naive > term-level interpreter or rewriter then you can get an order of > magnitude in > performance by optimizing the interpreter without leaving OCaml or > moving to > (real) bytecode compilation. -- http://wagerlabs.com