caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] [ANN] new release of OcamlJitRun - release 1.5-fetnat
@ 2004-07-10 22:04 Basile Starynkevitch [local]
       [not found] ` <000e01c466d3$aef06820$0100a8c0@warp>
       [not found] ` <40F08131.2000907@socialtools.net>
  0 siblings, 2 replies; 4+ messages in thread
From: Basile Starynkevitch [local] @ 2004-07-10 22:04 UTC (permalink / raw)
  To: caml-list

Dear All,

Thanks to the hard work of Paolo Bonzini & Laurent Michel, GNU
lightning has evolved (see its CVS for details). 

I was also able to correct some bugs in OcamlJitRun.

Now OcamlJitRun is running successfully on x86 and PowerPC, passing
all the tests. There is still a bug on Sparc (the t120-getstringchar
test fails), but it is not any more a very useful architecture - I
don't know if the bug is in Lightning or in OcamlJit, and the [only]
Sparc machine I am using here is so slow (SpartStation5) that it is
unusable for debugging.

Since OcamlJitRun is now running on PowerPC, I can now use it on my
PowerBook (12", 1.33GHz G4, 768Mb RAM).

If you have some big programs (compiled as a bytecode for future
Ocaml3.08 or Ocaml CVS) I will be glad to test them with OcamlJitRun,
or you can test them also. Any bytecode program (compiled with future
Ocaml3.08 or the latest CVS, not 3.07!) should do.

I am seeking significant Ocaml programs (compilable as bytecode with
future 3.08 or latest CVS) running more than half a minute of CPU (on
eg a 2GHz x86 PC) - and if possible less than 20 or 30 minutes of
CPU. Please suggest me some such programs. Neither Coq, nor CIL or
MetaOcaml are easily compilable with future 3.08 or recent CVS Ocaml -
because of ocamlp4 changes (the ABI for locations has changed) or C
primitive names (the C primitives routines have now a name starting
with caml_ and some programs incorrectly use the name of internal
primitive in the runtime).

If some people happens to use ocamljitrun, please tell me, in
particular the performance gain w.r.t ocamlrun (a factor of nearly two
is typical, provided the JIT translation overhead is negligible -
about 1 microsecond / bytecode instruction), hence my wish of running
times bigger than 10 seconds.

Ocamljitrun mimics the behavior (i.e. the stack and the heap) of the
bytecode interpreter ocamlrun. In particular, it interpret all
tail-recursive functions (even those with hundreds of arguments,
contrarily to ocamlopt) tail-recursively, without eating the stack.

Ocamljitrun works with the toplevel, dynamic linking (Dynlink module)
and runtime bytecode generators (MetaOcaml) - but it cannot be running
a debugged Ocaml bytecode program. OcamlJitRun requires a bytecode
program compiled by the future 3.08 release or the current CVS
snapshot of OCaml (3.07 or earlier Ocaml releases won't work).

See http://cristal.inria.fr/~starynke/ocamljit.html for more (a
submitted paper explains the internals of OcamlJitRun). OcamlJitRun is
free software LGPL license, and there is no restriction on the
bytecode program it executes.

Feel free to give any (positive or negative) feedback about OcamlJitRun.

Regards.

-- 
Basile STARYNKEVITCH -- basile dot starynkevitch at inria dot fr
other email : basile at starynkevitch dot net
Project cristal.inria.fr - phone +33 1 3963 5197 - mobile 6 8501 2359
http://cristal.inria.fr/~starynke --- all opinions are only mine 

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


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

* Re: [Caml-list] [ANN] new release of OcamlJitRun - release 1.5-fetnat
       [not found] ` <000e01c466d3$aef06820$0100a8c0@warp>
@ 2004-07-11  6:21   ` Basile Starynkevitch [local]
  0 siblings, 0 replies; 4+ messages in thread
From: Basile Starynkevitch [local] @ 2004-07-11  6:21 UTC (permalink / raw)
  To: Nicolas Cannasse, caml-list

On Sun, Jul 11, 2004 at 01:14:40AM +0200, Nicolas Cannasse wrote:
> [...]

(Citing me, Basile S.)

Basile>> I am seeking significant Ocaml programs (compilable as bytecode with
Basile>> future 3.08 or latest CVS) running more than half a minute of CPU (on
Basile>> eg a 2GHz x86 PC) - and if possible less than 20 or 30 minutes of
Basile>> CPU. Please suggest me some such programs. Neither Coq, nor CIL or
Basile>> MetaOcaml are easily compilable with future 3.08 or recent CVS Ocaml -
Basile>> because of ocamlp4 changes (the ABI for locations has changed) or C
Basile>> primitive names (the C primitives routines have now a name starting
Basile>> with caml_ and some programs incorrectly use the name of internal
Basile>> primitive in the runtime).
 
> Hello Basile, and thanks for your work on JIT. I didn't have time yet to
> give it a try, but I might do in a near future. One suggestion of typical
> OCaml application that performances could be compared is the ocaml compiler
> ocamlc itself, running on a large set of files : the ocamlc sources for
> example. Creation and manipulation of AST as well as typing algorithms are
> good test apllications (heavy use of recursive functions and pattern
> matching).

This is of course a test I'm using very often. However, most ocamlc
(or even ocamlopt) compilations are very short (typically, each ocamlc
invocation last less than 0.1 or 0.2 second), so the JIT translation
time is not at all negigible (it takes about 0.13 seconds on an AMD
2000 running at 1.66GHz). And since the JIT translation occurs in
every ocamlc process, you may actually observe an overall
slowdown. For example, in ocaml/stdlib make runs in 5.2 seconds, but
make RUNTIME=ocamljitrun takes 14.4 seconds (because ocamlc was invoked
84 times, and the bytecode was JIT translated 84 times)

On big compilation (in a single ocamlc or ocamlopt process),
OcamlJitRun gives a speedup of about 2. For example, the C-- compiler
contains a x86imkasm.ml file (of 3253 lines) which is compiled by
ocamlopt (with the bytecode interpreter ocamlrun) in 59.8 sec, and by
the same ocamlopt bytecode interpreted by ocamljitrun in 30.3 sec. For
reference, the native ocamlopt.opt does the same job in 17.2 sec.

Another interesting test would be a non-trivial toplevel
execution (The toplevel can be executed by OcamlJitRun, as avery
other bytecode), or programs using DynLink.

Thanks for your comments.

Regards.
-- 
Basile STARYNKEVITCH -- basile dot starynkevitch at inria dot fr
other email : basile at starynkevitch dot net
Project cristal.inria.fr - phone +33 1 3963 5197 - mobile 6 8501 2359
http://cristal.inria.fr/~starynke --- all opinions are only mine 

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


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

* Re: [Caml-list] [ANN] new release of OcamlJitRun - release 1.5-fetnat
       [not found] ` <40F08131.2000907@socialtools.net>
@ 2004-07-11  6:22   ` Basile Starynkevitch [local]
  2004-07-11 10:31     ` Benjamin Geer
  0 siblings, 1 reply; 4+ messages in thread
From: Basile Starynkevitch [local] @ 2004-07-11  6:22 UTC (permalink / raw)
  To: Benjamin Geer, caml-list

On Sun, Jul 11, 2004 at 12:52:17AM +0100, Benjamin Geer wrote:
> Basile Starynkevitch [local] wrote:
> >Feel free to give any (positive or negative) feedback about OcamlJitRun.
> 
> It's great to see OcamlJitRun progressing; I think it's a very important 
> tool.  Is there any chance you could package it for GODI?


OcamlJitRun is in fact a C program (since it replaces the ocamlrun
bytecode interpreter). Is GODI good for these?

-- 
Basile STARYNKEVITCH -- basile dot starynkevitch at inria dot fr
other email : basile at starynkevitch dot net
Project cristal.inria.fr - phone +33 1 3963 5197 - mobile 6 8501 2359
http://cristal.inria.fr/~starynke --- all opinions are only mine 

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


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

* Re: [Caml-list] [ANN] new release of OcamlJitRun - release 1.5-fetnat
  2004-07-11  6:22   ` Basile Starynkevitch [local]
@ 2004-07-11 10:31     ` Benjamin Geer
  0 siblings, 0 replies; 4+ messages in thread
From: Benjamin Geer @ 2004-07-11 10:31 UTC (permalink / raw)
  To: Basile Starynkevitch [local]; +Cc: caml-list

Basile Starynkevitch [local] wrote:
> On Sun, Jul 11, 2004 at 12:52:17AM +0100, Benjamin Geer wrote:
>>Is there any chance you could package it for GODI?
> 
> OcamlJitRun is in fact a C program (since it replaces the ocamlrun
> bytecode interpreter). Is GODI good for these?

Yes.  GODI includes OCaml itself as a package (it's the first one it 
installs), and therefore ocamlrun.

The current development version of GODI builds and installs the CVS 
version of OCaml, so you wouldn't have to worry about that dependency. 
It would be nice to package GNU Lightning as well.  When an OCaml 
library depends on a C library, the tendency in GODI is to package the C 
library as well, so it can be built automatically if the user doesn't 
already have it.

Ben

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


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

end of thread, other threads:[~2004-07-11 10:31 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-07-10 22:04 [Caml-list] [ANN] new release of OcamlJitRun - release 1.5-fetnat Basile Starynkevitch [local]
     [not found] ` <000e01c466d3$aef06820$0100a8c0@warp>
2004-07-11  6:21   ` Basile Starynkevitch [local]
     [not found] ` <40F08131.2000907@socialtools.net>
2004-07-11  6:22   ` Basile Starynkevitch [local]
2004-07-11 10:31     ` Benjamin Geer

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).