Hacker News new | ask | show | jobs
by jokoon 1618 days ago
So PyPy has JIT, but not CPython, that's weird.

Is there any reason why official python doesn't have any JIT option? Would that be too fastidious to develop?

3 comments

> Is there any reason why official python doesn't have any JIT option?

Desires to keep the implementation simple and approachable (relatively), as well as avoid issues of performance cliffs and such.

Also the C API has historically been extremely broad and provided large access to what amount to implementation details, making this keep working properly with a jit is difficult (at least for anything but a simplistic macro-ish JIT).

PyPy is not fully compatible with CPython. You won't have the same behaviour and CPython C API is not guaranteed to be fully compatible. So, I'm not sure that having a JIT that is fully compatible is easy.
pypy was started as an effort to make a JIT for python...when viewed in that light, it's not a weird situation at all.

as for why cpython doesn't use a jit? most likely to prevent any breakage with c modules