Version française
Home     About     Download     Resources     Contact us    
Browse thread
[announce] O'Browser : OCaml on browsers
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Kuba Ober <ober.14@o...>
Subject: Re: [Caml-list] [announce] O'Browser : OCaml on browsers
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