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 mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by yquem.inria.fr (Postfix) with ESMTP id 8C0E0BC54 for ; Sat, 26 Sep 2009 19:14:55 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AiYCAHvovUrUnwckjmdsb2JhbACCH5hjAQEBAQkLCAkRBrlWhB4FgVg X-IronPort-AV: E=Sophos;i="4.44,457,1249250400"; d="scan'208";a="33595299" Received: from relay.ptn-ipout02.plus.net ([212.159.7.36]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/RC4-SHA; 26 Sep 2009 19:14:55 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Al0GAHvovUrUnw4U/2dsb2JhbACCH9J5hB4FgVg Received: from pih-relay08.plus.net ([212.159.14.20]) by relay.ptn-ipout02.plus.net with ESMTP; 26 Sep 2009 18:14:54 +0100 Received: from [87.114.87.187] (helo=leper.local) by pih-relay08.plus.net with esmtp (Exim) id 1MrarG-00028E-Gy for caml-list@yquem.inria.fr; Sat, 26 Sep 2009 18:14:54 +0100 From: Jon Harrop Organization: Flying Frog Consultancy Ltd. To: caml-list@yquem.inria.fr Subject: Re: [Caml-list] HLVM? Date: Sat, 26 Sep 2009 18:26:12 +0100 User-Agent: KMail/1.9.9 References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200909261826.12639.jon@ffconsultancy.com> X-Plusnet-Relay: 5d91922986aff97bb084e21c916abaf1 X-Spam: no; 0.00; ocaml:01 ocaml:01 recursion:01 lacks:01 byte:01 vastly:01 ocaml's:01 polymorphism:01 polymorphism:01 compilation:01 run-time:01 parallelism:01 2009:98 dating:98 gratis:98 On Saturday 26 September 2009 17:33:41 David McClain wrote: > Hello Jon, > > I searched around for information on HLVM, and what, in particular, > makes it so well suited for scientific computing. I also have a long- > standing interest in scientific computing and OCaml, dating back to > 1999 when I created my NML system. > > However, wherever I found a reference to the HLVM architecture, all I > really found was a short blurb telling me to subscribe to your OCaml > Journal. The motivation behind the HLVM project is described here: http://www.ffconsultancy.com/ocaml/hlvm/ > Can you provide some gratis information about what makes HLVM so well > suited to scientific computing? HLVM is specifically designed with scientific computing in mind and, in particular, aims to provide a performance profile better suited to scientific computing. Some sacrifices have been made (e.g. polymorphic recursion) but the preliminary results are encouraging. For example, HLVM already thrashes OCaml on most numerical benchmarks: http://flyingfrogblog.blogspot.com/2009/03/performance-ocaml-vs-hlvm-beta-04.html HLVM also provides native code performance directly from the REPL out-of-the-box and offers some useful features that OCaml lacks such as generic printing. Other numerical types (byte, sbyte, int8, uint8, int16, uint16, int32, uint32, int64, uint64, float32, complex32, complex64) are also easy to add and will be vastly more efficient than OCaml's. However, HLVM is currently missing some core features. Most notably, polymorphism and a parallel GC. I intend to implement polymorphism by adding a monomorphization stage before JIT compilation and implement a parallel GC along the lines of the oc4mc project's. In essence, improvements in code generation and run-time data representation will make HLVM several times faster than OCaml for technical computing and improvements in parallelism will make it several times faster again. So I expect to get at least an order of magnitude performance improvement over OCaml in the end. > Something that might prompt one to actually subscribe to your journal? The OCaml Journal articles about HLVM describe the decisions that underpin HLVM's current design and the details of how those were implemented in OCaml using LLVM. In particular, the current OCaml Journal articles do *not* describe how HLVM can be used for scientific computing because it is still an experimental project and is likely to undergo major revisions (when I get to work on it again!). In other words, the articles are aimed at language implementors and not end users. -- Dr Jon Harrop, Flying Frog Consultancy Ltd. http://www.ffconsultancy.com/?e