# JIT Compiler for CPython

**URL:** <https://discourse.julialang.org/t/jit-compiler-for-cpython/108055>\
**Category:** Offtopic\
**Tags:** python\
**Created:** [December 26, 2023, 12:33pm UTC](https://discourse.julialang.org/t/jit-compiler-for-cpython/108055 "2023-12-26T12:33:04Z")\
**Posts on this page:** 1\
**Showing post:** 11

<div class="post-metadata">

**Author:** ![Palli](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/palli/32/3380_2.png) [@Palli](https://discourse.julialang.org/u/Palli)\
**Post date:** [April 16, 2024, 5:42pm UTC](https://discourse.julialang.org/t/jit-compiler-for-cpython/108055/11 "2024-04-16T17:42:04Z")

</div>

> [@Wispy](#):
>
> What would be the advantage of using something like this in Julia given that optimized Julia is already comparable to C?

Welcome Wispy to Julia, the advantage would smaller compiled Julia programs, and, indirectly in some cases, faster Julia programs.

Note, Julia is already the fastest dynamic language, after static (classic) Fortran:

![image](https://global.discourse-cdn.com/julialang/original/3X/1/f/1f4cd7e4fdb26d25f92df35fc7e72b88986697b3.png)

Until recently (i.e. with previous Julia version), Julia was compared to Java there at the Benchmark Game, but now to Fortran (and Chapel and C++), the current next fastest language(s).

We can fix that graph by working on the outlier(s), the top one (I think only one or two to beat Fortran); and the fixed startup-cost highlighed by the lowest outlier.

Julia isn’t really slower than C, Rust or C++. That’s an illusion. They compile ahead of time (e.g. with the slow LLVM), but the rules there only allow source code for Julia and thus Julia has the cost of compiling (JIT, and Julia’s JIT is slower than it needs to be) on the fly added to its runtime.

> **[Julia vs Classic Fortran - Which programs are fastest?](https://benchmarksgame-team.pages.debian.net/benchmarksgame/fastest/julia.html)**
>
> Julia Classic Fortran - Which programs have fastest performance?

E.g. this one can be improved:

> **[fannkuch-redux - Which programs are fastest? (Benchmarks Game)](https://benchmarksgame-team.pages.debian.net/benchmarksgame/performance/fannkuchredux.html)**
>
> fannkuch-redux - Which programs are fastest? — How fast programs repeatedly access a tiny integer-sequence.

> [@Is it time to make LLVM optional and how?](https://discourse.julialang.org/t/is-it-time-to-make-llvm-optional-and-how/112677):
>
> LLVM is a very heavy dependency, and is required (for fully compiled apps), just (I meant e.g.) in case eval is used. I would like to drop LLVM requirement (for still rather fast code), and I know it’s possible, then you just (currently) risk a runtime error. Or you can use “min” here (but it’s very slow at runtime since all your code in interpreted): --compile={yes\*|no|all|min} Enable or disable JIT compiler, or request exhaustive or minimal compilation When I say …

---

_[View the full topic](https://discourse.julialang.org/t/jit-compiler-for-cpython/108055)._
