From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by yquem.inria.fr (Postfix) with ESMTP id 78243BC37 for ; Fri, 1 Jan 2010 21:23:27 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AkAEAK/oPUs+BBFpYmdsb2JhbACBSZl5IiEGiDiuZYQxBA X-IronPort-AV: E=Sophos;i="4.47,486,1257116400"; d="scan'208";a="44012823" Received: from smtp-105-friday.noc.nerim.net (HELO mallaury.nerim.net) ([62.4.17.105]) by mail1-smtp-roc.national.inria.fr with ESMTP; 01 Jan 2010 21:23:27 +0100 Received: from hector.lesours (ours.starynkevitch.net [213.41.244.95]) by mallaury.nerim.net (Postfix) with ESMTP id 4AF99A1053; Fri, 1 Jan 2010 21:23:25 +0100 (CET) Received: from glinka.lesours ([192.168.0.1]) by hector.lesours with esmtp (Exim 4.71) (envelope-from ) id 1NQo1u-00005I-GJ; Fri, 01 Jan 2010 21:23:26 +0100 Message-ID: <4B3E59C7.50106@starynkevitch.net> Date: Fri, 01 Jan 2010 21:23:35 +0100 From: Basile STARYNKEVITCH User-Agent: Mozilla-Thunderbird 2.0.0.22 (X11/20091109) MIME-Version: 1.0 To: Jon Harrop Cc: caml-list@yquem.inria.fr Subject: Re: [Caml-list] ocaml, llvm and generating code at runtime References: <405ED4B9-9B3C-4BAA-9C79-C18BB8FDDB4D@gmail.com> <4B3E3343.2060809@starynkevitch.net> <201001011908.48316.jon@ffconsultancy.com> In-Reply-To: <201001011908.48316.jon@ffconsultancy.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam: no; 0.00; basile:01 basile:01 ocaml:01 runtime:01 ocaml:01 wiki:01 gcc:01 gcc:01 faiencerie:01 92340:01 reine:01 quicker:98 wrote:01 wrote:01 caml-list:01 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: basilestarynkevitchnet mobile: +33 6 8501 2359 8, rue de la Faiencerie, 92340 Bourg La Reine, France *** opinions {are only mines, sont seulement les miennes} ***