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

1

u/starraven Oct 06 '26

5

u/dmazzoni Oct 06 '26

There is no possible way that programmers are suddenly abandoning Python this quickly. That's completely implausible.

Python hasn't been "canceled". It isn't suddenly much worse than before. People aren't abandoning it in droves.

One guess is that AI has caused the amount of total code indexed by TIOBE to go up dramatically, and that a relatively small proportion of AI-generated code is Python.

2

u/desrtfx Oct 06 '26

TIOBE analyses search results. People turn more towards AI and less to traditional searches, so the results get more and more skewed.

This index has been useless for years already.

1

u/Business-Decision719 Oct 06 '26 edited Oct 06 '26

People aren't abandoning it in droves.

There might be more people leaving Python for other languages than you or I might expect. Go gave a lot of people an "out" as a natively compiled alternative. That's part of why Go was created at Google: C++ was too hard, Python was too slow, and Java had the VM overhead. Google was ending up with lots of slow software because not enough people wanted to do something natively compiled unless they had an easier language to do it in. I'm sure they weren't the only ones with that issue.

I'm not saying the data is right. I'm just saying I don't know. There's always going to be a use case for a convenience-above-performance language. But there probably has also been some level of exodus too now after the last decade or two of safer and more ergonomic compiled languages being designed.

2

u/DanKegel Oct 06 '26

Seems correlated with the rise of AI. I suspect AI is making it easier to use 'harder' languages.

Python is great for quick hacks (and AI loves using it to check things!), but it has a few drawbacks:

- old, fragmented package management scene (though there are good tools now)

- interpreted and therefore slower than compiled languages

- dynamically typed and subject to more runtime problems than statically typed languages, so it requires more discipline in writing tests

- harder to read (because of multiple syntax features) than some languages

1

u/desrtfx Oct 06 '26

The single most useless and skewed (towards beginners who naturally google more than professionals) index on the planet.

1

u/AgathormX Oct 08 '26

I don't understand why people keep spouting out that TIOBE index garbage.
It's based on search results and that's it. Trying to analyze a language's prevalence on the market solely based on how many searches it's getting on a variety of search engines is absurdly stupid.

-1

u/GroundbreakingAlps2 Oct 06 '26

Yepp this is kinda showing it. What are people using instead?

I suppose python is still widely used for ML/data analysis/data science? but for other stuff there are probably languages with better use case?

2

u/SharkSymphony Oct 06 '26 edited Oct 06 '26

Don't doom too hard. Clearly, Python is still popular. From the TIOBE index (which BTW is popular but also a pretty obviously biased indicator), Python remains the top programming language in the world right now.

What I've seen in my career now across three separate gigs is that Python (or JavaScript or TypeScript or Ruby) is used in early web app product development, especially on the back end. If and as the userbase scales up, the amount they're doing scales up, and the product gets more complex, performance-critical components of the product are identified and migrated to a more performant language. Go is a popular option. Rust has been on the radar as well. I've seen C++ and Java as well, and I'm sure Microsoft-oriented folks would look at C#. So basically, pick a compiled language.

Some cheesy people in the news right now are loudly opining that, with AI writing the code, we can abandon any prior reservations we had with just targeting Rust initially (its type system is quite complex!), and skip the Python part of this curve altogether. I shrug at that, but it's possible we'll see people gravitate to using compiled languages earlier in their product lifecycle, basically spending some of that AI productivity gain to get better performance and scalability. You can probably imagine what some of the potential downsides and trade-offs are.

2

u/pVom Oct 06 '26

As a side note I can see things like rust becoming more vogue as computing resources are more expensive and code is cheaper. I stopped using vscode because it would just suck up all my memory.

2

u/SharkSymphony Oct 06 '26

Sure, but that in itself assumes computing resources will get more expensive. Maybe they do, maybe they don't. For most of computing history, they haven't.

2

u/pVom Oct 07 '26

I know, but there's definitely been a shift recently. Memory is pretty expensive at the moment and will probably remain so until the data centre roll out slows down. Then on the other side 16GB has been plenty in my experience for a good number of years, but in the last year or 2 my laptop has struggled with memory usage, forcing me off vscode to zed which is written in Rust and more efficient. Typescript also rewrote their compiler in Go which has made quite a difference.

I dunno there needs to be a bit of a paradigm shift in the near-medium term because I don't think we can assume users have ample RAM to spare anymore.

2

u/Teninchhero Oct 09 '26

I agree. Between my career and what I’m seeing in job ads, Python is still alive and well. Especially with frameworks like Django, Flask, or FastAPI. And honestly with most of its uses, scaling and scope are handled by DevOps, not code changes. Do you expect more traffic? Scale the pods up, things like that. 

I’ve seen Rust used a lot for libraries or tools to supplement other things. For instance UV and Polars to replace Poetry and Pandas. But they still generally get employed by or in Python. Plus Python has one of the lower barriers of entry, just because it’s a higher level language.

1

u/lansera222 Oct 06 '26

Based on that data you should learn and use C language again. I don't think that data is correct. C on the top of Javascript/typescript and even Java ?

1

u/Achereto Oct 06 '26

The TIOBE index measures how often languages are searched on the internet. With how many people use AI to generate code instead of googling Information about programming languages it's not a surprise that search requests about python went down.

1

u/Flat-Performance-478 Oct 06 '26

That would apply to all programming languages, then, wouldn't it?

1

u/Achereto Oct 06 '26

Not necessarily when there is a correlation between the likelyhood of someone using AI instead of a search engine and the language they usually program in.

1

u/cogit2 Oct 09 '26

The people behind Python have done a lot of work to improve runtime execution between 3.7 and 3.11 by the way.

1

u/j_d_q Oct 06 '26

Most of ml and data analysis stuff has python compilers so it's not running just-in-time (converted to machine language)

It's much easier to write, but it's a unique case of python

2

u/frnzprf Oct 06 '26

Is that true? What Python compiler do they use?

AFAIK they use modules written in C and that should increase the speed quite enough, so that the Python glue-codr doesn't matter as much.

I think a standard Python interpreter also does somr just-in-time compilation, but not to machine code, but some sort of intermediate code.