hn.today

How Fast is Python 3.15?

blog.miguelgrinberg.com63 points45 comments
Screenshot of How Fast is Python 3.15?

This is an informal performance benchmark that compares Python 3.15 (release candidate) against CPython 3.10-3.14, PyPy 3.12, Node.js 26.3 and Rust 1.97 using two test programs: a recursive Fibonacci computation (fibo.py, first 40 terms) and a bubble sort of 10,000 random numbers (bubble.py). Each test is run single-threaded and with four parallel threads, and CPython variants include standard, JIT (available since 3.13) and free-threading (no GIL). Tests were run three times on an Intel Core i5 laptop running Gentoo Linux and results reported as average times and relative speed ratios versus Python 3.15.

Findings: CPython 3.15 shows only a small single-threaded improvement over 3.14; the most notable interpreter advances came in 3.11 and 3.14. The JIT build in 3.15 produces meaningful wins (about 1.20× faster on fibo, 1.28× on bubble versus standard 3.15). The free-threading build delivers large multithreaded gains (about 4.5× faster than standard CPython on the multi-threaded fibo test) by removing the GIL, though its single-threaded performance is similar to previous releases. PyPy remains dramatically faster than CPython on these workloads (e.g., ~5.5× faster on fibo), while Node and especially Rust outpace the Python runtimes by large margins on these specific tests.

Read on blog.miguelgrinberg.com45 comments on Hacker News

Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.

More in Programming

Berthd

Berthd

Berthd enables coding agents like Claude Code and Codex to run on your own dev boxes, continuing work even when your laptop is closed. It offers a user-friendly interface for managing tasks, comparing worktrees, and customizing themes, all while running agents remotely and securely. (berthd.app)

The daily digest

Today's best Hacker News stories, summarized and screenshotted, one email a day.