[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: JIT compilation speed



On Mon, 2015-07-27 at 23:52 +0100, Dibyendu Majumdar wrote:
> On 27 July 2015 at 23:20, Basile Starynkevitch <basile@starynkevitch.net> wrote:
> >>> Is there a timeframe for the performance improvements to the JIT
> >>> compilation speed?
> >>
> >> The patch kit I posted here:
> >>    https://gcc.gnu.org/ml/gcc-patches/2015-06/msg00116.html
> >> gives about a 5x speedup (from about 50ms down to about 10ms on my box),
> >
> 
> Ok, that seems good improvement. I don't have a specific benchmark but
> I have noticed that when I enable full compilation the Lua test suite
> takes 4-5 times longer to run compared to LLVM - in both cases the JIT
> compilation time dominates - so improvement of 5x may put libgccjit in
> the same ballpark as LLVM. That would be good enough to start with.

FWIW, the timer patch:
 https://gcc.gnu.org/ml/gcc-patches/2015-07/msg02715.html
is now in trunk (r226530).

So if you're using trunk, you should be able to:

  /* One-time initialization. */
  gcc_jit_timer *timer = gcc_jit_timer_new ();



  /* For all of your contexts, have them all use the
     same shared timer:  */
  gcc_jit_context_set_timer (ctxt, timer);



  /* On shutdown, print the accumulated timings.  */
  gcc_jit_timer_print (timer, stderr);
  gcc_jit_timer_release (timer);

to get a profile on stderr of where all that time is being spent.

[snip]


Dave