English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2009-09-27 (18:51)
From: Jon Harrop <jon@f...>
Subject: Re: [Caml-list] JIT & HLVM, LLVM
On Sunday 27 September 2009 18:35:32 Edgar Friendly wrote:
> Vincent Aravantinos wrote:
> > I think what Jon means is that, with JIT, polymorphic functions can be
> > specialized at run-time and allow optimizations that are not currently
> > achieved by the Ocaml native code compiler.
> The alternative to specializing at runtime using JIT is to do it at
> compile time (/ link time) using a form of whole-program analysis.  How
> expensive would this be, and how hard would it be to still support
> separate compilation?

C++ has those features and they are blamed for slow compilation. However, 
separate compilation is not the issue so much as dynamic loading.

> And how much would the OCaml world cry if we didn't have fully-separate
> compilation?

I think it is a bad idea to consider how much the OCaml world would cry. 
Indeed, we cannot even agree on what constitutes the OCaml world. Xavier said 
that most OCaml users care about the performance of Coq which is, IMHO, 
insanely inaccurate. The important thing is what we can offer the whole 
world, not what little remains of the OCaml world (who are a self-selected 
group of people who, by definition, endure OCaml's shortcomings). I think 
that an OCaml-like language that addresses OCaml's performance (including 
parallelism) and FFI issues would be much more widely useful and is an 
entirely achievable goal.

> At the moment, and for the foreseeable future, anything 
> binary is bound tightly to the compiler version, and binary distribution
> of modules seems pretty much impossible due to this and unknown other
> factors.

Right. Separate compilation and dynamic linking and trivial with a JIT 

> How much easier would the above be given the source code / 
> some intermediate representation to generate specialized code with?

Infinitely easier.

Dr Jon Harrop, Flying Frog Consultancy Ltd.