From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.2 required=5.0 tests=AWL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by yquem.inria.fr (Postfix) with ESMTP id 85551BC37 for ; Sun, 27 Sep 2009 20:51:31 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AoADAHBRv0rUnwdkkWdsb2JhbACCH5hjAQEBAQkLCgcTBLZ4hB4F X-IronPort-AV: E=Sophos;i="4.44,461,1249250400"; d="scan'208";a="35098794" Received: from relay.pcl-ipout02.plus.net ([212.159.7.100]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/RC4-SHA; 27 Sep 2009 20:51:01 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AscIALdQv0rUnw6T/2dsb2JhbACCH9AdhB4F Received: from ptb-relay03.plus.net ([212.159.14.147]) by relay.pcl-ipout02.plus.net with ESMTP; 27 Sep 2009 19:51:01 +0100 Received: from [87.114.87.187] (helo=leper.local) by ptb-relay03.plus.net with esmtp (Exim) id 1Mrypo-0000ad-HU for caml-list@yquem.inria.fr; Sun, 27 Sep 2009 19:51:00 +0100 From: Jon Harrop Organization: Flying Frog Consultancy Ltd. To: caml-list@yquem.inria.fr Subject: Re: [Caml-list] JIT & HLVM, LLVM Date: Sun, 27 Sep 2009 19:51:27 +0100 User-Agent: KMail/1.9.9 References: <4E6F3027-5745-462D-AF10-30C868285D28@refined-audiometrics.com> <4ABFA264.7060903@gmail.com> In-Reply-To: <4ABFA264.7060903@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200909271951.27762.jon@ffconsultancy.com> X-Plusnet-Relay: 360290c3b7f3e9db4d012474a318751e X-Spam: no; 0.00; run-time:01 ocaml:01 compiler:01 runtime:01 compilation:01 compilation:01 ocaml:01 coq:01 ocaml's:01 ocaml-like:01 ocaml's:01 parallelism:01 ffi:01 compiler:01 trivial:01 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 compiler. > 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. http://www.ffconsultancy.com/?e