language-bench

Python

The reference CPython interpreter: bytecode interpreter with reference counting and a cycle collector.

www.python.org ↗
Overall speed rank
#3 of 3
18.38× the fastest language
Latest release
3.15
10 tracked releases since 2016
Strongest on
String operations
4.48× vs the fastest
Weakest on
Matrix multiply
505× vs the fastest

Performance by problem

Newest release (3.15), default build (python3). The index is how many times slower this language is than the fastest entry on that problem (1.00× = fastest); rank is among all languages.

ProblemTimevs fastestRankMemory
Binary Trees288 ms5.58×
#3 / 39.3 MB
Fannkuch-redux475 ms25.9×
#3 / 36.2 MB
File processing913 ms6.31×
#3 / 36.8 MB
Hash map397 ms12.8×
#3 / 3135 MB
JSON parsing714 ms36.5×
#3 / 3154 MB
Matrix multiply954 ms505×
#3 / 318.1 MB
N-Body simulation6.42 s101×
#3 / 36.6 MB
Parallel reduction2.19 s23.4×
#3 / 316.6 MB
Prime sieve395 ms19.7×
#3 / 341.1 MB
Sorting756 ms4.68×
#3 / 3106 MB
String operations72.6 ms4.48×
#3 / 342.4 MB

Compare with other languages

How fast each language is relative to Python (composite over all tasks).

C
18× faster
Go
10× faster

Build settings

python3 default

Default interpreter.

python3 {harness}/harness.py {src}/main.py

Every release (default build)

Speed across releases

Did Python get faster? Every tracked release plotted at its release date, one line per build setting. Shows time, memory or binary size over all problems by default.

0.0 ms194 ms387 ms581 ms775 ms2024202520262023202220212020201920183.153.143.133.123.113.103.93.83.73.6python3python3

7 tracked releases have not been measured for this problem yet (3.12, 3.11, 3.10, 3.9, 3.8, 3.7, 3.6, shown faded on the axis). Lines appear as soon as a second release has data.

Each point is one language release on its official release date, measured on an average machine. Hover a line, its label or a legend button to highlight it; hover a point for release highlights. “All problems” is the geometric mean over every scored problem; releases not yet measured on all of them are left out.

Release highlights

  1. Python 3.15 2026-10-09
  2. Python 3.14 2025-10-07
    Free-threaded build officially supported · Optional tail-call interpreter · Deferred annotation evaluation
  3. Python 3.13 2024-10-07
    Experimental free-threaded build (no GIL) · Experimental JIT compiler
  4. Python 3.12 2023-10-02
    Per-interpreter GIL · Inlined comprehensions (PEP 709)
  5. Python 3.11 2022-10-24
    Specializing adaptive interpreter (PEP 659) · Zero-cost exceptions; 10-60% faster than 3.10 on average
  6. Python 3.10 2021-10-04
    Structural pattern matching
  7. Python 3.9 2020-10-05
  8. Python 3.8 2019-10-14
  9. Python 3.7 2018-06-27
  10. Python 3.6 2016-12-22

Badge

Show this language's overall rank in your README or website:

PreviewPython rank on language-bench
Markdown[![Python on language-bench](https://stijnris.github.io/language-bench/badges/python.svg)](https://stijnris.github.io/language-bench/languages/python/)
HTML<a href="https://stijnris.github.io/language-bench/languages/python/"><img src="https://stijnris.github.io/language-bench/badges/python.svg" alt="Python on language-bench"></a>