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 7F217BC37 for ; Mon, 28 Sep 2009 03:25:17 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AsYBAN2sv0rUnwdkkWdsb2JhbACCH5hjAQEBAQkLCgcTBLcEhB4F X-IronPort-AV: E=Sophos;i="4.44,462,1249250400"; d="scan'208";a="33655834" Received: from relay.pcl-ipout02.plus.net ([212.159.7.100]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/RC4-SHA; 28 Sep 2009 03:25:17 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AkcFAEutv0rUnw6U/2dsb2JhbACCH9AqhB4F Received: from fhw-relay07.plus.net ([212.159.14.148]) by relay.pcl-ipout02.plus.net with ESMTP; 28 Sep 2009 02:25:16 +0100 Received: from [87.114.87.187] (helo=leper.local) by fhw-relay07.plus.net with esmtp (Exim) id 1Ms4zM-00024E-Dn for caml-list@yquem.inria.fr; Mon, 28 Sep 2009 02:25:16 +0100 From: Jon Harrop Organization: Flying Frog Consultancy Ltd. To: caml-list@yquem.inria.fr Subject: Re: [Caml-list] HLVM stuff Date: Mon, 28 Sep 2009 02:25:44 +0100 User-Agent: KMail/1.9.9 References: <200909280014.58488.jon@ffconsultancy.com> <4DB7BEFB-70C6-4ADA-B0F9-4ED0717A85B6@refined-audiometrics.com> In-Reply-To: <4DB7BEFB-70C6-4ADA-B0F9-4ED0717A85B6@refined-audiometrics.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200909280225.44292.jon@ffconsultancy.com> X-Plusnet-Relay: 5ea70d18990d9ee349d238c83f8b5a45 X-Spam: no; 0.00; ocaml:01 ocaml:01 ocaml-like:01 syntax:01 fsharp:01 wiki:01 compiler:01 run-time:01 wikipedia:01 wiki:01 native-code:01 ocamlopt:01 ocaml's:01 bytecode:01 native-code:01 On Monday 28 September 2009 01:35:32 David McClain wrote: > Yes, this is beginning to sound very interesting... So now that you > have F#, which I understand to be some derivative of OCaml, F# is superficially similar to OCaml, most notably its OCaml-like syntax, but there are some quite major differences: http://www.strangelights.com/fsharp/wiki/default.aspx/FSharpWiki/FSharpAndOCaml.html > why do you need HLVM? Good question. I saw these important advantages realized in F# by Microsoft and wanted to bring those benefits to the OCaml/Linux world. There is no "need" to do so unless you refuse to use Windows and I am happily using Windows now. Moreover, the libraries available under Linux are dire in comparison to .NET. Hence I am no longer really motivated to work on HLVM. F# is a lot more fun and a lot more profitable. :-) > Is F# using the LLVM? No. F# is Microsoft's new programming language for .NET. > or is it executing natively compiled code? Yes. The F# compiler generates .NET assemblies containing CIL (Common Intermediate Language) that the CLR (Common Language Run-time) then JIT compiles the CIL to native code: http://en.wikipedia.org/wiki/File:CLR_diag.svg This is true of the interactive F# REPL as well as compiled binaries. > From what I have garnered today in a quick scan of JIT docs, it > appears that JIT cannot compete yet with native code. But if the > timings you stated are for some kind of JIT against byte-codes, I am > very impressed. The timings I posted show JIT-compiled F# solving your problem orders of magnitude faster than native-code compiled with ocamlopt. OCaml's interpreted bytecode is even slower than its compiled native code, of course. I don't know how fast other native-code compiled languages like C, C++ and Fortran are in comparison except that some of my numerical F# code outperform's Intel's vendor-tuned Fortran running on Intel hardware. -- Dr Jon Harrop, Flying Frog Consultancy Ltd. http://www.ffconsultancy.com/?e