← all posts

pycc-next 0.1.0 is out: 34x faster than CPython, and it tells you when your types lie

Two days ago this repo had a README and a pile of ADRs I’d left behind. Today it has a release you can download. 🚀

What you get ⚡

$ curl -LO https://github.com/rotnov/pycc-next/releases/download/v0.1.0/pycc-v0.1.0-x86_64-linux.tar.gz
$ tar xzf pycc-v0.1.0-x86_64-linux.tar.gz
$ ./pycc-v0.1.0-x86_64-linux/bin/pycc build mandelbrot.py -o mandelbrot --release

Speed, measured today, same machine, best of 7, process start included:

program vs CPython 3.13 vs hand-written Rust
mandelbrot 33.7x faster 1.1x slower
spectral_norm 29.2x faster 3.5x slower
nbody 23.3x faster 4.2x slower
sieve 16.6x faster 3.1x slower
fib(32) 10.8x faster 3.8x slower

mandelbrot is basically at Rust speed. The rest is 3-4x off - that’s the next fight.

Errors where they belong:

error[T0021]: argument 2 of `area` expects `int`, got `str`
 --> diag.py:12:15
   |
12 | print(area(2, "x"))
   |               ^^^ expected `int`, found `str`

Untyped code? Also fine 🐍

--non-strict compiles Python with no annotations at all. Whatever can’t be proven typed runs through CPython - down to a single statement. On 200 real competitive programming solutions: 200/200 produce exactly CPython’s output, and 84% of their top-level statements run native. That’s a CI gate now: one wrong output and the build goes red.

What it cost to get here 🧾

Building in public means the receipts:

  • Security review found ~20 real bugs on the way - use-after-frees in fresh reference-counting code, an unkeyed string hash (hash flooding), a set &= that overwrote its own refcount. All fixed, all with regression tests. If you write a memory manager in two days, expect this, and run a reviewer on every push.
  • rc.1 shipped broken. The binary looked for its runtime on the CI machine’s disk. rc.2 fixed it, and the release pipeline now unpacks the archive somewhere else and compiles three programs before publishing anything.
  • Correctness beats speed, every time. x ** 0.5 is not sqrt(x) - they differ on 262,808 of 300M inputs, and CPython prints pow’s answer. So pycc proves when they agree before using the fast one.

What it is not (yet) 🧭

Linux x86_64 only. No cycle collector. **kwargs, generator send(), and a list of smaller gaps live in DEVIATIONS.md - every one documented, none silent.

Next up: numpy arrays as native types, closing the last 3-4x to Rust, macOS.

Try it. Break it. Tell me what didn’t compile. 🔥