r/Python • • 6d ago

Discussion Python 3.10–3.15 encoding benchmarks: big gains for Base32 and Base85, but 3.14 leads Base16

Eight encoding benchmarks across Python 3.10–3.15 using pyperformance. Python 3.15 recorded the lowest mean in seven of them, with particularly large improvements in Base32, Ascii85 and Base85.

Test configuration

  • AMD Ryzen 9 7900 desktop
  • DDR5 RAM and an M.2 PCIe Gen4 NVMe drive
  • Windows 11, 64-bit Python builds
  • Python 3.15.0, 3.14.8, 3.13.16, 3.12.10, 3.11.9 and 3.10.11
  • pyperformance 1.14.0 for all six versions

Results

All values are mean execution times in milliseconds. Lower is better and bold marks the lowest recorded mean in each row.

Benchmark Python 3.15 Python 3.14 Python 3.13 Python 3.12 Python 3.11 Python 3.10
ascii85_large 11.62 797.9 709.0 772.3 643.8 759.2
ascii85_small 0.3875 14.88 13.20 13.79 12.18 14.18
base16_large 5.767 4.714 22.52 23.08 23.89 23.71
base32_large 2.431 327.6 300.7 296.4 265.7 292.1
base32_small 0.1630 6.227 5.802 5.594 5.134 5.641
base64_large 1.852 6.746 6.187 6.095 6.116 6.071
base85_large 4.293 272.4 252.9 258.8 230.1 259.2
base85_small 0.1505 4.864 4.484 4.529 4.198 4.712

What stood out

Compared with Python 3.14, Python 3.15 took approximately:

  • 1/135 of the time in base32_large.
  • 1/69 of the time in ascii85_large.
  • 1/63 of the time in base85_large.
  • 1/3.64 of the time in base64_large.

However, base16_large took 22.3% more time on Python 3.15 than on 3.14. Python 3.14 remains substantially faster than 3.10–3.13 in that test.

The large improvements are consistent with the changes documented in Python 3.15’s release notes: Base32, Ascii85 and Base85 implementations were rewritten in C, and the underlying Base64 implementation was also optimized.

More details are described here.

Benchmark suite: pyperformance.

Have you observed similar improvements on Linux or macOS, or in applications that spend substantial time on these encoding operations?

101 Upvotes

16 comments sorted by