Personally I feel JITs have gotten too much hype. While they have some advantages in optimization, it seems far outweighed by the downsides. I’d rather have an interpreter for development and a static compiler for production.
Cython has long been an interesting alternative here - a gradually typed amalgam of Python & C that lets you write/compile Python extension modules without needing to learn much of the CPython API. You can even use --embed to compile your whole script file and -X infer_types.verbose=True to let you know where types are dynamic/implicit rather than declared. Several big core packages like scipy use Cython. Few seem to mention it as a wholesale replacement for CPython which it absolutely can be.
Personally, I prefer Nim [2] which has more compile-time meta-programming support, is strongly typed from the outset, and has a lot of syntactic flexibility like UFCS, a "command call syntax" and many other goodies.
Comments
Personally I feel JITs have gotten too much hype. While they have some advantages in optimization, it seems far outweighed by the downsides. I’d rather have an interpreter for development and a static compiler for production.
Cython has long been an interesting alternative here - a gradually typed amalgam of Python & C that lets you write/compile Python extension modules without needing to learn much of the CPython API. You can even use --embed to compile your whole script file and -X infer_types.verbose=True to let you know where types are dynamic/implicit rather than declared. Several big core packages like scipy use Cython. Few seem to mention it as a wholesale replacement for CPython which it absolutely can be.
Personally, I prefer Nim [2] which has more compile-time meta-programming support, is strongly typed from the outset, and has a lot of syntactic flexibility like UFCS, a "command call syntax" and many other goodies.
[1] https://cython.org/
[2] https://nim-lang.org/
You could use Julia in an interpreted mode (or a compiler with low optimization) and then statically compile it for production.
The JIT involved is really a static compiler that has been adapted for use as a JIT compiler: https://llvm.org/docs/ORCv2.html
https://juliadebug.github.io/JuliaInterpreter.jl/stable/ https://julialang.github.io/PackageCompiler.jl/stable/apps.h... https://github.com/tshort/StaticCompiler.jl
I'm a big fan of Numba in Python, where you can add JIT compilation only to the methods you want.