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=2.5 required=5.0 tests=AWL,DNS_FROM_RFC_ABUSE, DNS_FROM_SECURITYSAGE,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 mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by yquem.inria.fr (Postfix) with ESMTP id 2889ABBB7 for ; Tue, 18 Nov 2008 19:18:13 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApgBAH2VIklDWxLCbmdsb2JhbACBbZFsPrMIhyaEOIJ5 X-IronPort-AV: E=Sophos;i="4.33,626,1220220000"; d="scan'208";a="31575710" Received: from ip67-91-18-194.z18-91-67.customer.algx.net (HELO server1.bertec.net) ([67.91.18.194]) by mail4-smtp-sop.national.inria.fr with ESMTP; 18 Nov 2008 19:18:12 +0100 Received: from kuba.bertec.net (kuba.bertec.net [192.168.2.16]) by server1.bertec.net (Postfix) with ESMTP id 2E3AC105735 for ; Tue, 18 Nov 2008 13:18:11 -0500 (EST) From: Kuba Ober To: caml-list@yquem.inria.fr Subject: Re: [Caml-list] [announce] O'Browser : OCaml on browsers Date: Tue, 18 Nov 2008 13:18:08 -0500 User-Agent: KMail/1.9.10 References: <492199E2.1020504@gmail.com> <200811180818.01042.jon@ffconsultancy.com> In-Reply-To: <200811180818.01042.jon@ffconsultancy.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200811181318.10282.ober.14@osu.edu> X-Spam: no; 0.00; ocaml:01 ocaml:01 runtime:01 ocaml's:01 bindings:01 bug:01 syntax:01 bytecode:01 compiler:01 bytecode:01 cheers:01 javascript:98 javascript:98 chrome:98 threads:01 On Tuesday 18 November 2008, Jon Harrop wrote: > On Monday 17 November 2008 16:20:50 Benjamin Canou wrote: > > Hi, > > > > O'Browser is an implementation of the OCaml virtual machine in > > JavaScript, designed to run in web browsers. > > It features a runtime library compatible with OCaml's standard one > > (including OOP and concurrent threads) and bindings of some JavaScript > > functions to manipulate the DOM primitives. > > > > The distribution is available at [1] and an online version of the > > tutorial is reachable at [2]. > > > > Please note that this is an early version, in particular the DOM > > interface module is neither pretty nor well typed. > > However, it can already be used to create little applets or scripts (as > > in the tutorial [2], the examples of the distribution [3] or my webpage > > [4]) and we'll be glad to receive your comments or bug reports. > > This is a really awesome project! Performance is fine on a decent browser. > Times taken to highlight syntax_common.ml on this machine: > > Chrome: 0.5s > Firefox: 1.1s > IE7: 5.7s > Konqueror: 17.5s > > Looks like you've got an OCaml bytecode interpreter written in Javascript. > Could you write a compiler and call eval to get better performance? That's what I was gonna suggest: if one could sorta-kinda macro-expand bytecode interpreter running on some bytecode, then JIT platforms such as tracemonkey could dramatically improve the performance of such code. Cheers, Kuba