Performance Benchmarking: Comparing Python Versions 3.9 to 3.14

0
3
Asked By CuriousCoder42 On

Hey everyone! After sharing some Node.js benchmarks, I received a lot of requests for a similar analysis on Python, so I decided to run benchmarks from Python versions 3.9 through 3.14. Here's a quick look at the results:

|Benchmark|3.9.25|3.10.19|3.11.14|3.12.12|3.13.11|3.14.2|
|:-|:-|:-|:-|:-|:-|:-|
|HTTP GET throughput (MB/s)|9.2|9.5|11.0|10.6|10.6|10.6|
|json.loads (ops/s)|63,349|64,791|59,948|56,649|57,861|53,587|
|json.dumps (ops/s)|29,301|30,185|30,443|32,158|31,780|31,957|
|SHA-256 throughput (MB/s)|3,203.5|3,197.6|3,207.1|3,201.7|3,202.2|3,208.1|
|Array map + reduce style loop (ops/s)|16,731,301|17,425,553|20,034,941|17,875,729|18,307,005|18,918,472|
|String build with join (MB/s)|3,417.7|3,438.9|3,480.5|3,589.9|3,498.6|3,581.6|
|Integer loop randomized (ops/s)|6,635,498|6,789,194|6,909,192|7,259,830|7,790,647|7,432,183|

If you're interested in the full charts and more details, you can check them out here: [Full Benchmark](https://www.repoflow.io/blog/python-3-9-to-3-14-performance-benchmarks). Let me know if you'd like me to run more benchmarks!

5 Answers

Answered By TechieTribe On

What OS did you run these tests on? It’s important to know to gauge performance accurately.

CuriousCoder42 -

I ran this on macOS 25.0.0 with no background apps affecting performance.

Answered By StatisticalSam On

To really assess these benchmarks, I'd love to know how many times you repeated each test. Having some stats like standard deviation would also help clarify how significant these results are.

Answered By CaffeinatedCoder On

It seems like 3.11 was best for HTTP throughput, but I'm concerned about the json.loads regression. I think I’ll stick with 3.11 in production for now.

Answered By BenchmarkBrat On

Interesting results! I noticed a drop in json ops from 3.9 to 3.14—can you elaborate on what might cause that?

Answered By DataDude77 On

Nice job on the benchmarks! Could you share the actual benchmark code? It'd also be helpful to annotate the charts with notes about what's better versus worse when it comes to the metrics you provided.

ScriptSlinger99 -

Definitely, ops per second makes it pretty clear—higher numbers are faster.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.