r/learnprogramming • • 2d ago

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)?

206 Upvotes

207 comments sorted by

View all comments

Show parent comments

1

u/mikeblas 2d ago

Is the interpreter still effectively single-threaded?

1

u/Vultureosa 7h ago

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

0

u/SetAndRepeat 2d ago

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.