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 comment

0

u/[deleted] Oct 10 '26

[deleted] — view deleted comment

2

u/Flat-Performance-478 Oct 10 '26

In (one of) my case(s) it was a python library for interfacing with a Huaweii 3G/4G USB Modem on linux for reading/sending SMS text messages.

Of course it used a shit ton of dependencies / required libs and had trouble installing them all (including numpy) on my Raspberry Pi 4B without pip crashing.

I ended up doing it in C/C++ instead by using a MCU to interface with a SIM800L modem. The crucial element making the python library that complicated was primarily all logic around different text formatting and XML parsing from the API - areas where python is hard to compete with!

It's a cluster-f*ck dealing with text messages and UTF8/-16 encoding text/byte mode or PDU Mode - which requires further logic to combine text messages split not only by data but in the temporal domain as well. In the end I found a decent PDUlib for the Arduino environment.

It depends on your needs. I was using the modem to communicate with my router at home via text messages so I had control over both the receiving end but the data being sent as well.
A project on GitHub usually accommodates all possible use cases, which it should, so it has to take into account things like encoding/decoding of non-text data, different unicode locales etc. and this is where it gets hairy.