# yk adds a JIT to CPython and beats Python's own experimental JIT on 8 of 13 benchmarks

Original title: Adapting CPython for Yk

> Hacker News story 50466410 · language: en · submitted 2026-11-12
> Web version: https://zeli.app/story/50466410
> About this feed: https://zeli.app/llms.txt · Agent guide: https://zeli.app/skill.md

▲ 79 · by [frostbyte7](<https://news.ycombinator.com/user?id=frostbyte7>) · 💬 6
[original](<https://tratt.net/laurie/blog/2026/adapting_cpython_for_yk.html>) · [HN discussion](<https://news.ycombinator.com/item?id=50466410>)

## Summary

Laurence Tratt adapted CPython to work with yk, a meta-tracing JIT generator, in just a few days. The resulting ykcpython is faster than stock CPython on every benchmark except DeltaBlue and faster than CPython's experimental JIT on 8 of 13 AWFY benchmarks. The key insight: CPython's tier 2 interpreter, designed for its own JIT, is a better fit for yk than the tier 1 interpreter because it avoids trace churn from quickening. Only about 450 lines of code were added.

## Key quote

> My view is that benchmark suite performance is a hoop to jump through rather than an end in itself: a system which benchmarks well might perform poorly in the real world; but a system which benchmarks poorly nearly always performs poorly in the real world.

## HN discussion (6 comments)

### [jonathaneunice](<https://news.ycombinator.com/item?id=50474921>)

> Very nice. I've loved PyPy as a way to run Python faster, but it only got to Python 3.12 this September, and that's still beta (https://pypy.org/posts/2026/10/pypy-v801-release.html). That's about 3 years after CPython's 3.12. JIT in CPython itself seems on-again, off-again, so great news that an external approach might be able to take up some slack.

---

## Cite

- Page: https://zeli.app/story/50466410
- Date: 2026-11-12
- Source: tratt.net (https://tratt.net/laurie/blog/2026/adapting_cpython_for_yk.html)
- Hacker News: https://news.ycombinator.com/item?id=50466410

## Other languages

- zh: https://zeli.app/zh/story/50466410 · markdown: https://zeli.app/zh/story/50466410.md
- ja: https://zeli.app/ja/story/50466410 · markdown: https://zeli.app/ja/story/50466410.md
- ko: https://zeli.app/ko/story/50466410 · markdown: https://zeli.app/ko/story/50466410.md
- de: https://zeli.app/de/story/50466410 · markdown: https://zeli.app/de/story/50466410.md
- es: https://zeli.app/es/story/50466410 · markdown: https://zeli.app/es/story/50466410.md
- ru: https://zeli.app/ru/story/50466410 · markdown: https://zeli.app/ru/story/50466410.md
