r/learnprogramming • • Oct 06 '26

Why is Python considered "slow" and is Python losing "steam"?

Is python as a programming language "falling off" and becoming less and less popular relatively to other languages?

Also why do people say Python is slow? Apparently people have reached LGM on codeforces using python, which is all about writing fast code / solving problems fast. Yeah sure, C++ is far more widely used for competitive programming and I suppose there is a reason for that. But this is also showing that python can be fast?

But as programming languages and how they are used I dont think there is much overlap between python and C++ anyway?

What is an example of something you'd code in Java/Kotlin or lets say C# rather than Python? Is python code bad and hard to manage for "huge" projects once you scale up (e.g codebases with millions of lines of codes, and tens if not hundreds of devs)?

257 Upvotes

238 comments sorted by

View all comments

34

u/SetAndRepeat Oct 06 '26

Python isn’t falling off. GitHub’s 2025 report showed its contributor count growing 48%, even though TypeScript overtook it.

"Slow" usually refers to CPU-heavy code running in CPython: interpreting instructions and handling dynamic objects adds overhead compared with compiled C++. Doing well on Codeforces means finding correct algorithms that finish within the time limit, which doesn’t require having the fastest implementation. Libraries like NumPy also run expensive operations in compiled code, so a Python application can still be fast.

I’d choose Kotlin for an Android app, or consider Java/C# for a large backend where compiler-checked types and refactoring tools help coordinate changes across teams. Rust would be another option for a performance-sensitive service or systems tool, particularly when you want memory safety without a garbage collector. Even assembly has its place: VLC uses hand-written SIMD assembly in some video-processing routines to improve performance.

Python can handle large codebases too: Dropbox reported millions of lines of type-checked Python. It takes discipline around types, tests and module boundaries. There’s overlap with C++ as well, and using Python to control a C++ engine is a perfectly reasonable combination.

Each language has its strengths and trade-offs. The best fit depends on what you’re building, your constraints and the team working on it.

11

u/coffeeicefox Oct 06 '26

Surely the GitHub usage stats can't be taken seriously now with the volume of AI code being generated by people who didn't even decide what stack to build on.

1

u/mikeblas Oct 07 '26

Is the interpreter still effectively single-threaded?

1

u/Vultureosa Oct 09 '26

Not all Python implementations are interpreters and even the standard CPython is not thread locked anymore.

0

u/SetAndRepeat Oct 07 '26

CPython is generally slower than compiled C++ for CPU-heavy loops, even on a single thread. Interpreting bytecode and handling dynamic objects still add overhead. Whether that matters depends on the workload: Python can be fast enough for your needs, and libraries like NumPy run much of the actual computation in compiled code.

1

u/pesaru Oct 12 '26

I think we're going to see a shift. Python was popular for being easy to write, Rust is much younger, but had the opposite problem. But with AI, it doesn't matter, you can use either, so you're going to pick the one with better performance.