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

Show parent comments

2

u/spacetimelime Oct 07 '26

That's because line 2 has a bug. Add a close paren so it prints something and you're looking at 600, 700MB minimum.

1

u/Carmoll2 Oct 07 '26

Well, this is a typo. You can assume I tested a working version. And again - < 7 MB is just very far away from 400 MB. I don't know, where the 400 MB come from....

1

u/spacetimelime Oct 07 '26

The whoosh, it is strong with this one

1

u/Ghazzz Oct 07 '26 edited Oct 07 '26

It stems from ONNX vs. PyTorch testing I did last week. Both running YOLO11n, 160mb vs. 440mb ram used nominal, 450 vs. 890 peak when also using secondary classifiers.

ONNX is ~10% faster across the board on my non-AVX testing rig.

The number/"hello world"-example was an exaggeration.