From: David Malcolm <dmalcolm@redhat.com>
To: Basile Starynkevitch <basile@starynkevitch.net>
Cc: Dibyendu Majumdar <mobile@majumdar.org.uk>, jit@gcc.gnu.org
Subject: Re: JIT compilation speed
Date: Thu, 01 Jan 2015 00:00:00 -0000 [thread overview]
Message-ID: <1438096253.15571.142.camel@surprise> (raw)
In-Reply-To: <55B6B80F.5030506@starynkevitch.net>
On Tue, 2015-07-28 at 01:00 +0200, Basile Starynkevitch wrote:
> On 07/28/2015 00:52, Dibyendu Majumdar wrote:
> >
> >> So, for Dibyendu Majumdar: if the GCCJIT compilation time matters a lot to
> >> you in RAVI and the performance of the emitted machine code matters much
> >> less to you, I am afraid that GCCJIT is not the optimal library for your
> >> needs in RAVI (using GNU lightning or asmjit would make JIT-ing time much
> >> faster, at the expense of a produced machine code which runs 2 to 5 times
> >> slower than what GCCJIT can achieve with -O1).
> >>
> > Yes understand that - I think that libgccjit needs to be at least as
> > efficient as LLVM - that should be good enough.
>
>
> Given that today Clang/LLVM is significantly quicker to compile C code
> than GCC is for -O1, that won't happen very soon. GCCJIT is GCC based,
> so will continue to keep the heavy weight of GCC.
I don't know that -O1 in gcc vs -O1 in llvm is an "apples-to-apples"
comparison; different compilers may have a different idea of what
optimizations should be enabled at each numbered level.
> Some people within GCC are trying to make it work faster (as a C or C++
> compiler). When that would happen (and it might take years) GCCJIT will
> also work faster. But don't hope much of that for this 2015 year (and
> probably not even for 2016).
>
> GCCJIT is GCC based, so cannot be faster than GCC is!
That said, we could tweak GCC for specific workloads. For example, each
-O level expresses a particular combination of passes. libgccjit could
potentially build an alternate pass_manager for a particular
gcc_jit_context, and build a specifically-tuned tree of passes,
eliminating passes that aren't wanted, and perhaps even having custom
passes. I'm not sure how to express any of that in the API though.
> Between GCCJIT & LLVM, I guess that GCCJIT -when used with -O3- will
> produce slightly faster machine code than what LLVM can give, at the
> expense of a significantly slower JIT time.
>
> Look at GCCJIT as something GCC based, without the inconvenience of
> having to generate by yourself some C code. BTW, in my MELT experience,
> generating C code and compiling and dlopen-ing it, can be fast enough
> for some interactive usage.
>
> Regards.
>
next prev parent reply other threads:[~2015-07-28 15:19 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-01 0:00 Dibyendu Majumdar
2015-01-01 0:00 ` David Malcolm
2015-01-01 0:00 ` Basile Starynkevitch
2015-01-01 0:00 ` David Malcolm
2015-01-01 0:00 ` Dibyendu Majumdar
2015-01-01 0:00 ` Basile Starynkevitch
2015-01-01 0:00 ` David Malcolm [this message]
2015-01-01 0:00 ` David Malcolm
2015-01-01 0:00 ` Dibyendu Majumdar
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=1438096253.15571.142.camel@surprise \
--to=dmalcolm@redhat.com \
--cc=basile@starynkevitch.net \
--cc=jit@gcc.gnu.org \
--cc=mobile@majumdar.org.uk \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).