Browse thread
High-performance bytecode interpreter in OCaml
-
Joel Reymont
-
Jon Harrop
-
Joel Reymont
-
Jon Harrop
- Joel Reymont
- Grant Olson
-
Jon Harrop
-
Joel Reymont
-
Jon Harrop
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Joel Reymont <joelr1@g...> |
| Subject: | Re: [Caml-list] High-performance bytecode interpreter in OCaml |
On Aug 15, 2007, at 4:18 PM, Jon Harrop wrote: > let rec compile bytecode = match bytecode with > | 0x83::x::t -> > let x = String.lowercase (string_of_int x) in > let t = compile t in > (fun k -> print_string x; k t) I'm curious, would this be any faster than doing whatever the 0x83 opcode requires and then just invoking (compile t)? Does it actually make sense to convert the whole bytecode file into a chain of closures and then execute it repeatedly? Would there be a huge gain compared to interpreting every time? I guess it would make sense if closures could be compiled into machine code "just in time" or if my VM was compiled using ocamlopt. I'm not sure, though, so I'm looking for input. Thanks, Joel -- http://wagerlabs.com