What are the optimizations in JIT that are not in AOT?

0 views
Skip to first unread message

er...@ericyen.com

unread,
Nov 16, 2015, 10:04:47 AM11/16/15
to Numba Public Discussion - Public
Hi,

What are the optimizations that are present in the JIT compilation that are not present in the AOT compilation?

Stanley Seibert

unread,
Nov 16, 2015, 10:12:42 AM11/16/15
to Numba Public Discussion - Public
The only difference in code generation between JIT and  AOT compilation is that we tell LLVM to optimize for the specific CPU (equivalent to -mcpu=X) in JIT compilation, whereas for AOT compilation we stick with the default.  If your CPU is capable of more advanced SIMD instructions than the generic x86_64 target (like AVX), you'll miss out on those with AOT compilation.

We do plan to add a way to pass specific compilation flags into the CC object to control this.

On Sun, Nov 15, 2015 at 9:12 PM, <er...@ericyen.com> wrote:
Hi,

What are the optimizations that are present in the JIT compilation that are not present in the AOT compilation?

--
You received this message because you are subscribed to the Google Groups "Numba Public Discussion - Public" group.
To unsubscribe from this group and stop receiving emails from it, send an email to numba-users...@continuum.io.
To post to this group, send email to numba...@continuum.io.
To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/numba-users/da42a454-9139-44fd-ab2e-02978444e6ad%40continuum.io.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.

Gaëtan de Menten

unread,
Nov 16, 2015, 4:03:59 PM11/16/15
to numba...@continuum.io
On Mon, Nov 16, 2015 at 4:12 PM, Stanley Seibert <stan.s...@continuum.io> wrote:
The only difference in code generation between JIT and  AOT compilation is that we tell LLVM to optimize for the specific CPU (equivalent to -mcpu=X) in JIT compilation, whereas for AOT compilation we stick with the default.  If your CPU is capable of more advanced SIMD instructions than the generic x86_64 target (like AVX), you'll miss out on those with AOT compilation.
We do plan to add a way to pass specific compilation flags into the CC object to control this.

In my dream world, there would be an option in AOT numba to include several versions and just enough code in the compiled function to select the best implementation at runtime. Is this something you are planning, or aiming at?

Gaëtan

Stanley Seibert

unread,
Nov 16, 2015, 5:28:35 PM11/16/15
to Numba Public Discussion - Public
It sounds quite doable, but it isn't a high priority feature for us at the moment.  If we saw a case where there were significant speed differences between JIT and AOT code, it would bump it up in priority, though.

--
You received this message because you are subscribed to the Google Groups "Numba Public Discussion - Public" group.
To unsubscribe from this group and stop receiving emails from it, send an email to numba-users...@continuum.io.
To post to this group, send email to numba...@continuum.io.

datn...@gmail.com

unread,
Jul 27, 2016, 1:39:38 PM7/27/16
to Numba Public Discussion - Public
Are there plans to allow compiling JIT classes and ufuncs/gufuncs and generic functions?
Reply all
Reply to author
Forward
0 new messages