Version française
Home     About     Download     Resources     Contact us    
Browse thread
ocaml, llvm and generating code at runtime
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Basile STARYNKEVITCH <basile@s...>
Subject: Re: [Caml-list] ocaml, llvm and generating code at runtime
Jon Harrop wrote:
> On Friday 01 January 2010 17:39:15 Basile STARYNKEVITCH wrote:
>> LLVM is rumored to be a bit faster, but is also rumored to be slow as a
>> pure JIT (just in time) code generated (w.r.t. to other non Ocaml
>> implementations - eg SBCL or CLISP common lisp).
> 
> Are you saying that LLVM's JIT is slow to generate code or that the code it 
> generates runs slow?


I heard that LLVM code generation time is significantly higher (i.e. slower) than other JIT technologies. So machine 
code generation time is apparently significant which might be an issue inside a web server) but performance of the 
generated code is supposedly good (inside a web server this is important only if the generated code runs a lot, in 
particular more than in a single session).

I don't have enough personal experience to validate that claim.

However, both MONO & PARROT sites are saying something similar:

http://www.mono-project.com/Mono_LLVM

http://trac.parrot.org/parrot/wiki/JITRewrite

http://cliffhacks.blogspot.com/2007/03/experimenting-with-llvm.html

But again, I may be wrong. Only real benchmarks on real applications can tell.

I believe that libjit & GNU lightning should probably both generate machine code quicker than LLVM does, but the 
performance of the generated code (by libjit or by lightning) is worse than when using LLVM.

And some benchmarks on http://www.phoronix.com/scan.php?page=article&item=apple_llvm_gcc&num=1 suggest that LLVM 
generated machine code is less efficient than GCC generated machine code.

Again, take all this with a grain of salt...

Regards.
-- 
Basile STARYNKEVITCH         http://starynkevitch.net/Basile/
email: basile<at>starynkevitch<dot>net mobile: +33 6 8501 2359
8, rue de la Faiencerie, 92340 Bourg La Reine, France
*** opinions {are only mines, sont seulement les miennes} ***