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
HLVM stuff
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2009-09-28 (01:25)
From: Jon Harrop <jon@f...>
Subject: Re: [Caml-list] HLVM stuff
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:


> 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:


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.