Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: Jon Harrop <jon@ffconsultancy.com>
To: Basile STARYNKEVITCH <basile@starynkevitch.net>
Cc: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] ocaml, llvm and generating code at runtime
Date: Fri, 1 Jan 2010 22:29:02 +0000	[thread overview]
Message-ID: <201001012229.02622.jon@ffconsultancy.com> (raw)
In-Reply-To: <4B3E59C7.50106@starynkevitch.net>

On Friday 01 January 2010 20:23:35 Basile STARYNKEVITCH wrote:
> 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...

That's a fair assessment but LLVM is only about 2x slower than the fastest 
compilers and it generates code that runs 2-10x faster. For example, 
compiling the 155kLOC of LLVM IR generated by HLVM's test suite takes 9.65s.

I think it was a big mistake for the Go developers at Google and the Mono 
developers at Novell to not build upon LLVM.

My main concern about other JITs is maturity: AFAIK LLVM has orders of 
magnitude more users that all of the others combined.

-- 
Dr Jon Harrop, Flying Frog Consultancy Ltd.
http://www.ffconsultancy.com/?e


  reply	other threads:[~2010-01-01 21:14 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-01 16:45 Joel Reymont
2010-01-01 17:39 ` [Caml-list] " Basile STARYNKEVITCH
2010-01-01 19:08   ` Jon Harrop
2010-01-01 20:23     ` Basile STARYNKEVITCH
2010-01-01 22:29       ` Jon Harrop [this message]
2010-01-01 22:33         ` Yoann Padioleau
2010-01-02  0:06           ` Jon Harrop
2010-01-01 19:31 ` Jon Harrop

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201001012229.02622.jon@ffconsultancy.com \
    --to=jon@ffconsultancy.com \
    --cc=basile@starynkevitch.net \
    --cc=caml-list@yquem.inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox