caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] Towards a really native toplevel… ocamlnat w/o as/ld
@ 2011-09-03 16:19 Benedikt Meurer
  2011-09-03 16:24 ` [Caml-list] " Benedikt Meurer
  2011-09-14 11:03 ` Benedikt Meurer
  0 siblings, 2 replies; 3+ messages in thread
From: Benedikt Meurer @ 2011-09-03 16:19 UTC (permalink / raw)
  To: caml-list

Hello,

I thought I'd just give a quick status update on the ocamlnat issue we've been working on for some time now (in a new thread since this is not strictly related to the linear scan patch). Right now we have working versions of ocamlnat for amd64 and i386 running on Linux and OS X (other systems should be supported as well, windows might need a short patch) which do no longer depend on external assemblers and linkers, the opcode emission and linking is done in-process.

The code for the amd64 version is available in the "ocamlnat-jit-amd64" branch of my "ocaml-experimental" repository at:

https://github.com/bmeurer/ocaml-experimental/tree/ocamlnat-jit-amd64

I'll push the i386 version once cleaned up and integrated with the approach implemented for the amd64 version now. It should be noted that there's still some room left for optimizations (i.e. use short jumps whenever possible, etc.), but the results so far are already quite promising: The new ocamlnat beats both the old ocamlnat as well as the byte code toplevel in every benchmark I've tried. I'll prepare a detailed comparison when time permits.

Benedikt

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Caml-list] Re: Towards a really native toplevel… ocamlnat w/o as/ld
  2011-09-03 16:19 [Caml-list] Towards a really native toplevel… ocamlnat w/o as/ld Benedikt Meurer
@ 2011-09-03 16:24 ` Benedikt Meurer
  2011-09-14 11:03 ` Benedikt Meurer
  1 sibling, 0 replies; 3+ messages in thread
From: Benedikt Meurer @ 2011-09-03 16:24 UTC (permalink / raw)
  To: caml-list


On Sep 3, 2011, at 18:19 , Benedikt Meurer wrote:

> I thought I'd just give a quick status update on the ocamlnat issue we've been working on for some time now (in a new thread since this is not strictly related to the linear scan patch). Right now we have working versions of ocamlnat for amd64 and i386 running on Linux and OS X (other systems should be supported as well, windows might need a short patch) which do no longer depend on external assemblers and linkers, the opcode emission and linking is done in-process.
> 
> The code for the amd64 version is available in the "ocamlnat-jit-amd64" branch of my "ocaml-experimental" repository at:
> 
> https://github.com/bmeurer/ocaml-experimental/tree/ocamlnat-jit-amd64

For the curious, the actual changeset (since 3.12.1) can be seen here:

https://github.com/bmeurer/ocaml-experimental/compare/3.12.1...ocamlnat-jit-amd64#files_bucket

Benedikt

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Caml-list] Re: Towards a really native toplevel… ocamlnat w/o as/ld
  2011-09-03 16:19 [Caml-list] Towards a really native toplevel… ocamlnat w/o as/ld Benedikt Meurer
  2011-09-03 16:24 ` [Caml-list] " Benedikt Meurer
@ 2011-09-14 11:03 ` Benedikt Meurer
  1 sibling, 0 replies; 3+ messages in thread
From: Benedikt Meurer @ 2011-09-14 11:03 UTC (permalink / raw)
  To: caml-list


On Sep 3, 2011, at 18:19 , Benedikt Meurer wrote:

> I'll push the i386 version once cleaned up and integrated with the approach implemented for the amd64 version now.

The i386 version is also fully functional now, and our current prototype is available from the ocamlnat-jit branch from my "ocaml-experimental" repository at:

https://github.com/bmeurer/ocaml-experimental/tree/ocamlnat-jit

> It should be noted that there's still some room left for optimizations (i.e. use short jumps whenever possible, etc.), but the results so far are already quite promising: The new ocamlnat beats both the old ocamlnat as well as the byte code toplevel in every benchmark I've tried. I'll prepare a detailed comparison when time permits.


I did a preliminary comparison today, results are available at:

http://ps.informatik.uni-siegen.de/~meurer/tmp/ocamlnat-benchmark-20110914.pdf

The results are given as speedup compared to the OCaml 3.12.1 byte code toplevel. "OCamlNat/jit" is ours, "OCamlNat/ext" is the ocamlnat thing that silently ships with OCaml 3.12.1, and "OCamlJIT2" is my previous byte code JITter. Time was measured as combined user+system time for the toplevel process plus all child processes.

As you can see, we achieved speedups of up to 100 times faster than the byte code toplevel (which is in part related to the fact that llvm-gcc is the default compiler with OS X Lion, and thereby disables the register assignment optimizations for the byte code interpreter).

greets,
Benedikt

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-09-14 11:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-03 16:19 [Caml-list] Towards a really native toplevel… ocamlnat w/o as/ld Benedikt Meurer
2011-09-03 16:24 ` [Caml-list] " Benedikt Meurer
2011-09-14 11:03 ` Benedikt Meurer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).