🌐
Medium
medium.com › @hieutrantrung.it › pythons-performance-revolution-how-3-11-made-speed-a-priority-4cdeee59c349
Python’s Performance Revolution: How 3.11+ Made Speed a Priority | by Trung Hiếu Trần | Medium
January 5, 2026 - This article explores how Python transformed from a language often dismissed for performance-critical work into one actively competing on speed, examining the technical innovations introduced in Python 3.11 through 3.14 (released October 2025[³]) that are making Python faster than ever before.
🌐
Python
wiki.python.org › moin › PythonSpeed › PerformanceTips
PythonSpeed/PerformanceTips - Python Wiki
The Python interpreter performs some periodic checks. In particular, it decides whether or not to let another thread run and whether or not to run a pending call (typically a call established by a signal handler). Most of the time there's nothing to do, so performing these checks each pass around the interpreter loop can slow things down.
Discussions

Python Performance - have you ever had to rewrite in something else? - Stack Overflow
Has anyone ever had code in Python, that turned out not to perform fast enough? I mean, you were forced to choose another language because of it? We are investigating using Python for a couple of More on stackoverflow.com
🌐 stackoverflow.com
Why Python is slow and how to make it faster
Seeing lots of comments being dismissive of the efforts of improving Python is a bit disheartening. Of course you should strive to write proper code, it's doesn't mean that having a good, fast implementation of the language isn't a large improvement. I'm thankful for people working on this, just getting glue code, scripts or not easily JIT'able code to run faster is very cool! More on reddit.com
🌐 r/Python
186
305
January 8, 2024
How much faster will python be in 10 years?

To my best approximation, it'll be about 69% faster than 2023 levels.

More on reddit.com
🌐 r/Python
133
100
October 10, 2023
Why is python slow?
Python is slower across the board than say C, but different versions of python may suffer more or less from several factors. The most common form of python is cpython this is an interpreted language, that means that instead of created machine code which runs directly on the processor python basically your code runs in a VM which is slow. Other versions of python like PyPy do not suffer from this because they are just in time compiled (JIT) this means that you run native assembly which makes PyPy around 8-10x faster iirc. However all python code suffers in speed because it has features which make programming intuitive such as garbage collection. Python deals with memory management for you, but that means it doesn't always make the optimal decisions. Python has a global interpreter lock (GIL) which largely makes multithreading ineffective in native python. Many other features like this all amount to python being extremely slow compared to C. Luckily 1. Most code doesn't actually need to be optimized very much because processors are so fast, and 2. If need be just write the performance heavy code in C then call your C code directly from python, this is how math libraries like NumPy work. More on reddit.com
🌐 r/learnprogramming
8
1
March 18, 2023
🌐
SOFTFORMANCE
softformance.com › home › blog › 25 tips for optimizing python performance
Optimizing Python Code for Performance: Tips & Tricks | SoftFormance
January 10, 2024 - While writing Python code, the developers should review it regularly. The point is to remove unnecessary code parts and save memory. There are multiple ways for removing dead code. These include multiprocessing, using content managers, and relying on preload managers. Don’t forget to monitor the performance of your Python apps because this allows you to properly evaluate the efficiency of your work.
🌐
GitHub
github.com › python › pyperformance
GitHub - python/pyperformance: Python Performance Benchmark Suite · GitHub
The pyperformance project is intended to be an authoritative source of benchmarks for all Python implementations. The focus is on real-world benchmarks, rather than synthetic benchmarks, using whole applications when possible.
Starred by 1K users
Forked by 202 users
Languages   Python 84.0% | HTML 14.4% | Shell 1.6%
🌐
Python
speed.python.org
Python Speed Center
Analyze performance over time · Compare different executables and revisions · Powered by Codespeed, Django and Python
🌐
TheServerSide
theserverside.com › tip › Tips-to-improve-Python-performance
9 tips to improve Python performance | TheServerSide
To select the best type to use for a collection, you must first understand the data with which you are working and the operations you want to perform. Using timeit we can see that testing membership with a set can be significantly faster than with a list: > python testtimeit_data_type.py Execution time(with list): 7.966896300087683 seconds Execution time(with set): 4.913181399926543 seconds
🌐
Miguel Grinberg
blog.miguelgrinberg.com › post › is-python-really-that-slow
Is Python Really That Slow? - miguelgrinberg.com
My standard response when someone asks me how I deal with Python being such a slow language is that Python is by far the fastest to write, cleanest, more maintainable programming language I know, and that a bit of a runtime performance penalty is a small price to pay when I'm rewarded with significant productivity gains.
🌐
Readthedocs
pyperformance.readthedocs.io
The Python Performance Benchmark Suite — Python Performance Benchmark Suite 1.14.0 documentation
The pyperformance project is intended to be an authoritative source of benchmarks for all Python implementations.
Find elsewhere
🌐
Lost
lost.co.nz › articles › sixteen-years-of-python-performance
Sixteen Years of Python Performance - Lost
I build and benchmarked 17 versions of Python against each other so that you don't have to. Let's compare the performance of every Python version from 2.6 all the way to the current 3.14 alpha release. Spoiler, it's going great!
🌐
DEV Community
dev.to › leapcell › python-performance-tips-you-must-know-24n5
Python Performance Tips You Must Know - DEV Community
January 29, 2025 - To improve performance, we should try to reduce unnecessary function calls and attempt to combine multiple operations into one, thereby reducing execution time and resource consumption.
🌐
JetBrains
blog.jetbrains.com › pycharm › 2025 › 11 › 10-smart-performance-hacks-for-faster-python-code
10 Smart Performance Hacks For Faster Python Code | The PyCharm Blog
November 17, 2025 - Whenever possible, modify objects in place instead of creating duplicates. This reduces memory usage and improves performance by avoiding the overhead of allocating and populating new structures. Many built-in data structures in Python provide in-place methods (e.g.
🌐
Stackify
stackify.com › 20-simple-python-performance-tuning-tips
Python Performance Tuning: 20 Simple Tips - Stackify
May 2, 2023 - Python optimizes developer productivity, but many solutions aren't always optimized for python performance. Here are 20 tips to improve performance.
🌐
Sentry
blog.sentry.io › python-performance-testing-a-comprehensive-guide
Python Performance Testing: A Comprehensive Guide | Sentry
September 30, 2022 - Performance testing verifies and documents a system's speed, reliability, and scalability. It's testing that, rather than focusing on features and functionality, tests how software responds to a load and how quickly it executes its tasks.
🌐
Real Python
realpython.com › python-profiling
Profiling in Python: How to Find Performance Bottlenecks – Real Python
May 3, 2024 - But, when you look closer at the documentation of random.uniform() or its implementation, then you’ll find that it’s a pure-Python function. Such functions can be orders of magnitude slower than built-in functions implemented in C. In this case, you can safely replace the call to uniform(0, 1) with random() because both functions are mathematically equivalent for these specific input values. When you do, you’ll observe an improvement in computation time—by as much as a whopping 40 percent! For the ultimate performance analysis experience, though, you’ll want to use the Linux perf tool.
🌐
Upsun
upsun.com › blog › python-performance-improvements
How Python's updates make it faster and more efficient | Upsun
January 8, 2026 - From specialized, adaptive interpreters to more efficient memory management and the introduction of JIT compilation, Python’s recent versions are evolving rapidly, offering performance gains of ~10%-60% across various workloads.
Top answer
1 of 16
34

Yes, I have. I wrote a row-count program for a binary (length-prefixed rather than delimited) bcp output file once and ended up having to redo it in C because the python one was too slow. This program was quite small (it only took a couple of days to re-write it in C), so I didn't bother to try and build a hybrid application (python glue with central routines written in C) but this would also have been a viable route.

A larger application with performance critical bits can be written in a combination of C and a higher level language. You can write the performance-critical parts in C with an interface to Python for the rest of the system. SWIG, Pyrex or Boost.Python (if you're using C++) all provide good mechanisms to do the plumbing for your Python interface. The C API for python is more complex than that for Tcl or Lua, but isn't infeasible to build by hand. For an example of a hand-built Python/C API, check out cx_Oracle.

This approach has been used on quite a number of successful applications going back as far as the 1970s (that I am aware of). Mozilla was substantially written in Javascript around a core engine written in C. Several CAD packages, Interleaf (a technical document publishing system) and of course EMACS are substantially written in LISP with a central C, assembly language or other core. Quite a few commercial and open-source applications (e.g. Chandler or Sungard Front Arena) use embedded Python interpreters and implement substantial parts of the application in Python.

EDIT: In rsponse to Dutch Masters' comment, keeping someone with C or C++ programming skills on the team for a Python project gives you the option of writing some of the application for speed. The areas where you can expect to get a significant performance gain are where the application does something highly iterative over a large data structure or large volume of data. In the case of the row-counter above it had to inhale a series of files totalling several gigabytes and go through a process where it read a varying length prefix and used that to determine the length of the data field. Most of the fields were short (just a few bytes long). This was somewhat bit-twiddly and very low level and iterative, which made it a natural fit for C.

Many of the python libraries such as numpy, cElementTree or cStringIO make use of an optimised C or FORTRAN core with a python API that facilitates working with data in aggregate. For example, numpy has matrix data structures and operations written in C which do all the hard work and a Python API that provides services at the aggregate level.

2 of 16
20

This is a much more difficult question to answer than people are willing to admit.

For example, it may be that I am able to write a program that performs better in Python than it does in C. The fallacious conclusion from that statement is "Python is therefore faster than C". In reality, it may be because I have much more recent experience in Python and its best practices and standard libraries.

In fact no one can really answer your question unless they are certain that they can create an optimal solution in both languages, which is unlikely. In other words "My C solution was faster than my Python solution" is not the same as "C is faster than Python"

I'm willing to bet that Guido Van Rossum could have written Python solutions for adam and Dustin's problems that performed quite well.

My rule of thumb is that unless you are writing the sort of application that requires you to count clock cycles, you can probably achieve acceptable performance in Python.

🌐
GeeksforGeeks
geeksforgeeks.org › python › tips-to-maximize-your-python-code-performance
10 Tips to Maximize Your Python Code Performance - GeeksforGeeks
July 23, 2025 - Use built-in functions and libraries- Python has a lot of built-in functions and libraries that are highly optimized and can save you a lot of time and resources. Avoid using global variables-Global variables can slow down your code, as they ...
🌐
Python⇒Speed
pythonspeed.com
Write faster Python code, and ship your code faster
From parallelism to compiled code and beyond, there are multiple different ways to speed up your Python code. Apply them all and your code will benefit from all of them! Learn more about the Practices of Performance.
🌐
Reddit
reddit.com › r/python › why python is slow and how to make it faster
r/Python on Reddit: Why Python is slow and how to make it faster
January 8, 2024 -

As there was a recent discussion on Python's speed, here is a collection of some good articles discussing about Python's speed and why it poses extra challenges to be fast as CPU instructions/executed code.

  • Pycon talk: Anthony Shaw - Why Python is slow

  • Pycon talk: Mark Shannon - How we are making CPython faster

  • Python 3.13 will ship with --enable-jit, --disable-gil

  • Python performance: it’s not just the interpreter

  • Cinder: Instagram's performance-oriented Python fork

Also remember, the raw CPU speed rarely matters, as many workloads are IO-bound, network-bound, or a performance question is irrelevant... or: Python trades some software development cost for increased hardware cost. In these cases, Python extensions and specialised libraries can do the heavy lifting outside the interpreter (PyArrow, Polards, Pandas, Numba, etc.).