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