Python JIT not yet fast

Python JIT not yet fast:

7 Likes

If only this huge work to try to make Python faster was redirected to Julia… :face_exhaling:

It is beyond sanity really.

6 Likes

I’m anticipating that things downstream of a polished juliac small binary compiler will substitute for a python jit compiler. If so, then effort currently expended on making python faster will instead shift into efforts on better julia integration into python and efforts on julia itself. Of course, in the long run, as python programmers write an increasing fraction of their code in julia, many will conclude that it is better to skip python entirely.

1 Like

But if you read what Ken Jin writes, it sounds like they’re optimistic

How does this compare to Numba JIT?
My colleagues who work in Python often bring up Numba, reducing their need to consider Julia for speed.

Also, in Julia, we usually omit the compilation time when talking about performance. But if comparing their JIT against Python interpreted code, perhaps they consider it. Does their JIT always recompile at every command?

surprised they’re not on Jax train yet

This kind of topic has come up many, many times already.

See many previous discussions of this topic linked in JIT Compiler for CPython - #4 by stevengj e.g. why previous attempts at a Python JIT compiler failed: Julia motivation: why weren't Numpy, Scipy, Numba, good enough? - #3 by kristoffer.carlsson

3 Likes

According to my experience, Julia is at least 5 times faster then Numba. And much more readable and maintainable. Reasons: Call overhead for Numba functions vs inlining of small functions in Julia, but also features like StaticArrays that can give a nice speed improvement not available in Numba.

3 Likes

I’d rather have an AOT compiler, realizing this is hard because of some truly dynamic Julia features that postpone compilation of some methods until there is a call for such methods. Maybe AOT would only compile methods that are dispatchable to based on method signatures in the source. Probably I don’t understand the complexities. But, cpython has so many years of relying on putting more stuff into their runtime and allowing more untyped variable references that it’s just a lot harder. We already have a pretty great JIT for Julia so let’s cheer for AOT.

That’s kind what the juliac.jl --experimental --trim try to do – it try to start with the entry signature (say, you have @ccallable interface, then the entry point types are concrete and static), and trace out what methods need to be compiled.

2 Likes