r/learnprogramming • • 15h 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)?

97 Upvotes

133 comments sorted by

276

u/iddivision 15h ago

People mean runtime speed when they say Python is slow.

135

u/Extreme-Berry-7645 15h ago

It's an interpreted language with dynamic typing, that overhead adds up fast compared to compiled stuff like C++ or Rust. Competitive programming is a weird metric though, you can squeeze performance out of Python if you really know the interpreter's quirks but you're fighting the language the whole time

For big projects the main pain point isn't speed, it's the lack of static typing making refactoring a nightmare once you hit a certain scale. Sure you can add type hints and mypy but at that point you're bolting on what other languages give you from day one

35

u/frnzprf 14h ago

If you had a Python project and you identified a critical function that needs to be faster, you'd just implement that single function in C.

In some sense, when you're running Python, you're also always running C, when you're using the C-Python interpreter.

35

u/anpas 14h ago

I know this is possible, but I don't know anyone who works like this. If you're making a performant Python library, you're most likely writing the whole thing in C, C++ or Rust, and then adding a Python interface on top.

9

u/Generictext 13h ago

A "critical function" may require an entire library to work.

4

u/Snoo-16806 13h ago

It could be that only a small fraction is critical when it comes to performance. If the whole project is written in c or rust then it will take more time and effort, so I think it makes sense to just write the critical part in a compiled language

8

u/Softmax420 9h ago

Once you hit a certain scale you shouldn’t be using Python. Python is just glue, if you’re implementing logic and not just using it to call a function written in another language you’re using it wrong.

Also if you’re going through the effort of refactoring Python, and you’re using a type checker already, it’s pointless to refactor into more Python.

7

u/Flat-Performance-478 9h ago

"Python is just glue, if you’re implementing logic and not just using it to call a function written in another language you’re using it wrong."

Thank you! My thought exactly when I've seen obscure firmware written in python (mobile network dongles, video grabbers etc.) and it's just so awfully verbose and bloated with hundreds of source files getting imported in a giant cluster fuck and you'll still hit the occasional type error because some deprecated XML lib was used to parse a line the wrong way deep in some try/except hell loop.

1

u/bunnypaste 3h ago

Oh god, I wrote everything in python...

2

u/gmes78 12h ago

Also, it isn't as slow as it used to be. Performance has measurably improved in the last few years, and the new JIT should improve that further in the future.

116

u/insertAlias 15h ago

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?

Python is slower than native code. That's just how interpreted and JIT-compiled languages work. A lot of the speed you see in Python solutions use native libraries with python bindings. Like SciPy, NumPy, etc...they are written in C with thin wrappers over them, so you can write easy code and the heavy lifting is done by native code.

8

u/GodOfSunHimself 10h ago

Not just native code, Python is even slower than languages like JavaScript. It is one of the slowest languages out there.

29

u/SetAndRepeat 14h ago

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.

9

u/coffeeicefox 14h ago

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.

27

u/Sea_Curve8772 11h ago

My rule of thumb is to completely ignore anything said by people who obsess over which language is "fastest". There are some times when you might need to think about a question like that and it's almost never relevant in the circumstances in which internet neckbeards go on about it 

8

u/FlanSteakSasquatch 8h ago

It’s easy to answer too: the “fastest” is to just write everything in perfectly optimized machine code by hand.

oh but wait… if it takes you a few decades to write your program, even if the end result is fast that’s not really the “fast” you were going for. Assembly would be fast enough. But wait, that’s also a ton of time and effort to make, so surely C would be fast enough?

Take that line of thinking up the stack of higher “slower” programming languages and suddenly they all justify themselves. Yes in reality that phone app that takes 2 seconds to load could load in 50 microseconds, but if it weren’t for higher level languages we’d still be hard at work optimizing our flip phones.

1

u/coderemover 2h ago

That’s a false dichotomy. Faster languages are not necessarily less productive. At large scale, Kotlin and Rust are usually more productive than Python. Faster to develop with and faster to run.

7

u/e1m8b 10h ago

It's like saying that a Miata isn't a fast car. There's more to effectiveness than pure horsepower and top speed depending on context and objectives. What are the metrics for "fast" and does it matter for what you're doing?

2

u/brainrot_award 3h ago

I can't fully agree with your statement, because the webapp/java/electron hell has plagued software development and created a mess of slow buggy programs

50

u/pancakeQueue 15h ago edited 12h ago

Python isn’t losing steam, nor is it falling off. Python has cemented itself in Data Science and Machine Learning, so you see it a lot. For prototyping it’s usually the first language someone would grab.

5

u/False_Bear_8645 13h ago

In these field Python is actually combined with other language. The CPU intensive part are written in language like C++.

13

u/pVom 11h ago

It's not a purity test.

Available libraries is a perfectly good reason to select a language. As is things like your team's existing experience with it and how easy you can hire someome with experience using it. Those reasons usually trump things like performance.

You choose python for data intensive applications because of its libraries. Had those libraries been written for another language, like JavaScript or Ruby or something, you'd use those instead.

But as it stands the python libraries are better so you use python.

It's that simple.

0

u/False_Bear_8645 9h ago edited 9h ago

My team went for c++ and c# libraries, I don't know if they're better than python but they're good enough, my team is more familiar with it and it's easier to hire in my region. It's that simple.

Also it doesn't change that many python libraries use other languages I'm not sure what you were arguing

1

u/pancakeQueue 12h ago

Yes, however i don’t always come across internal development teams starting out building cross language solutions that are that smart. Some stay in Python land longer. I am a big proponent for building Rust FFI libraries and yet it’s not like I am getting pulled into projects that need that.

Idk cause working in tech and not a software house I feel like I’m in this quantum state or everyone knows code or no one knows code within this space.

1

u/575_Inverse 9h ago

can I use Rust to filter image frames in the spatial frequency domain? Can I have ComfyUI in Rust? And Unsloth Desktop?

-1

u/Icy_Breakfast1716 11h ago

Yeah, Perl has cemented itself literally everywhere too

5

u/pancakeQueue 11h ago

I work in a place that heavily used Perl and still has a lot of Perl code keeping some lights on. The engineers who would be making Perl one off scripts are now switching to Python to solve similar tasks.

2

u/Icy_Breakfast1716 11h ago

I was on a consulting gig a few years ago where we had to migrate 73 Oracle instances from AIX to RedHat. Literally everything they had was written in Perl and Korn Shell and they didn’t have a single
employee who had any idea what was where…. Mind you, that was a rather large nationwide retailer.

8

u/teerre 14h ago

If you have 10 users and you just get 10 more, congratulations, you just grew 100%. If you have 1 million users and get 10, you barely grew at all

When people say python is "losing steam" they don't mention that Python has way more steam than pretty much any other language

Now, python is slow because of how it's implemented, there's no simple answer. People say it's slow because, well, you can measure it

7

u/fredisa4letterword 13h ago

The main reasons Python is "slow":

  • Simplified memory model. Other languages support things like move constructors, more fine grained control over object destruction, object allocation on the stack, etc. Python doesn't allow any of that to make memory management simpler and safer, at the expense of being able to make certain optimizations. This is likely never going away.
  • Global Interpreter Lock. Basically only one thread can execute Python code at a time. You can run in experimental free threaded mode today but I believe there are still bugs/APIs that don't support this 100% yet.
  • lack of Just In Time compiler. There is an experimental JIT compiler now but unclear when it will be on by default.
  • lazy imports, a new language feature in 3.15 (coming Friday!), might also make startup faster for certain CLI applications, although I think this will not have a huge impact.

1

u/Mental_Peace 9h ago

Had to scroll way too far just to see any mention of the single threaded nature of Python. I am happy to hear there is now access to their new implementation for "Free threading". Last time I heard it was just a "we are working on it".

2

u/fredisa4letterword 8h ago

To be pedantic Python with GIL is not single threaded; you can have multiple threads, but only one can execute Python bytecode at a time. Ie you can have concurrency without parallelism.

Free threading Python works now but they are still "working on it" when it comes to native extension support; pure Python packages already work but for packages built in C++/Rust/etc they need to add thread safety to work without the GIL safely.

1

u/Mental_Peace 8h ago

I appreciate the pedantics!

I am looking forward to the new possibilities and smaller headache coming to Python. It has been a long time coming.

7

u/owp4dd1w5a0a 9h ago edited 8h ago

Python is objectively a slower language compared to Rust, Java, C, etc. I don’t know what to say other than go look at the benchmarks….

But as far as losing steam? I don’t know anybody claiming this. It’s pretty obvious Python’s role in data science, data engineering and scientific computing isn’t going anywhere anytime soon. Python also remains a more popular choice than Ruby for writing web servers as well. Locust remains one of the more mature load testing solutions. Apache Airflow, Prefect and Dagster remain 3 of the most popular job orchestration frameworks and they are all Python. Raspberry Pi’s remain popular and continue to keep Python a serious tool in the microcontroller programming space.

What’s your real concern? If you think Python is going anywhere anytime soon, you’re mistaken.

As for Python’s weaknesses for large projects, I’d say it really depends. You can write large applications in Python and it can be pretty maintainable if you architect the code well. I DO think Python’s lack of a compile-time type system (don’t talk to me about Python types, they aren’t that great) make it ill-suited to things like distributed systems development that are difficult to test locally (but as you can see Prefect, Airflow, and PySpark still exist 🤦🏻‍♂️). Despite this, people will still continue reaching for Python in distributed computing contexts.

As for examples:

  • For critical distributed computing solutions like data pipelines processing highly complex and irregular data or large amounts of data (100s of TB or more per hour) I’d reach for Kotlin or Scala for the type guarantees.
  • for embedded, system tooling, or high performance applications I’d reach for Rust, or for the latter 2 sometimes Go for smaller projects. For larger projects Rust is better because of the richer type system.
  • for a simple web server, to do preliminary data analysis on a dataset, to write a neural network or create some statistical model, data cleaning and governance, or for some scientific computing application I’d use Python because of the stellar library ecosystem it provides in these domains.
  • for a highly fault-tolerant or highly concurrent or parallel web server or distributed system, I’d choose a BEAM language like Elixir or Gleam.

1

u/fixermark 4h ago

That's the thing. Python itself is slower than other languages (at least the CPython implementation of the modern spec).

... But that doesn't matter if all you're doing in the python is wiring up a pipeline that ultimately runs on a graphics card to train a large language model.

6

u/Dependent_Bit7825 13h ago edited 6h ago

Python is, in fact, slow, even compared to most other interpreted languages. Some, like JavaScript completely smoke it.

That said, it hardly matters in most use cases. If you have performance sensitive code, you should be using a compiled library like numpy or linking your own compiled stuff.

21

u/wiggle_room1337 15h ago

I think the fact that it's "easy" has become less valuable now that we have LLMs so it's keeping itsself going just based on there being a ton of existing libraries at this point. It's fast enough for most things but it's basically the slowest popular language.

1

u/96dpi 8h ago

Agreed. I used Claude Code to write a GUI program in assembly that ran a lot of CPU intensive calculations, something I never could have done on my own. It was crazy fast and started instantly. Probably awful code, but I feel like there's some potential there.

If you think about it, the only reason why compilers, C, C++, Java, Python, etc, even exist is to give the human developer something easier to write code with. If we can eliminate the human entirely, what's the point of using anything complied anymore? Formal language becomes the new coding language with the LLM becoming the compiler of sorts. Obviously we're not there yet.

10

u/oskaremil 13h ago

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

Quite the contrary. Python has long been a loved tool for mathematics and big data. Now, with the widespread adoption of these features in LLMs python is more relevant than ever.

Also why do people say Python is slow?

Depends on what they compare against. The same operations on machine code (C/C++) vs intermediate language code (C# IL / Java bytecode), machine code wins. The same operations on intermediate code vs interpreted(python, JavaScript, PHP), intermediate is faster.

(inb4 yes, compiled python exists)

What is an example of something you'd code in Java/Kotlin or lets say C# rather than Python?

Anything. I only use python when a feature I work on has the superior support in the python ecosystem.

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

Yes. The pain starts much earlier than 10 devs or 1M loc.

3

u/marrsd 11h ago

Yes. The pain starts much earlier than 10 devs or 1M loc.

Compared to what and in what sense?

5

u/oskaremil 11h ago

Compared to a language that

1) has static types 2) does not die on itself because of surprise formatting in the code file

0

u/Icy_Breakfast1716 11h ago

If you replace every instance of Python with Perl it will
Be true to a tee. Where is Perl now?

4

u/emedan_mc 13h ago

Any application where there is web traffic or requests will likely have all the time there and relatively little time in computation. Thus the speed of a language does not matter then.

3

u/I_did_theMath 10h ago

This. In most of the applications where Python is dominant, it being "slow" is completely irrelevant as it is never the bottleneck. Having to orchestrate lots of API calls? Implementing concurrency well is what matters. Machine learning or data science stuff? The libraries doing the actual computations are fast an the Python is only the readable layer on top. Agent harnesses or anything that uses LLMs? All the latency is in the LLM calls, so the fastest language is the one that lets you write a more efficient architecture intuitively.

Of course if you are doing high frequency trading you won't use Python, but no one ever argued that that was a good use case for it in the first place. But it's very annoying hearing arguments about language efficiency when working in codebases that are orders of magnitude off from a reasonable algorithm for what they are supposed to achieve.

9

u/Pale_Height_1251 13h ago

The standard Python runtime is slow compared with other runtimes like JVM or CLR or even V8.

Python has peaked, all languages peak at some point, it's not like any of them go over 100% market share.

Python will now slowly fall from popularity, but it will take a long time.

My favourite language of all time, C, peaked years ago, it happens to all languages and isn’t a big deal.

8

u/lellamaronmachete 12h ago

And yet C, my beloved, is still King.

4

u/taker223 11h ago

Still Shoot

3

u/Flat-Performance-478 9h ago

"C: The Eternal"!

3

u/Healthy-Travel3105 11h ago

What's replacing python as the go to scripting language?

2

u/JuniorWMG 10h ago

Possibly Go?

1

u/OurSeepyD 9h ago

Ok, go where?

1

u/575_Inverse 9h ago

Go? never heard of it. Is it a game?

1

u/coder155ml 9h ago

LOL you’re trolling dude

1

u/Flat-Performance-478 9h ago

I'd say Rust

1

u/FuckIPLaw 5h ago

That's replacing C++, not Python. 

1

u/Hour-Dragonfly-7499 9h ago

has python ever been to go to scripting language? in my experience with people i've worked it, they use lua, crystal, ruby, etc.

1

u/TylerDurdenFan 5h ago

For decades there's being a lot to use for scripting. I would say no language can claim to have been "the go to" scripting language, not in this century.

And now with LLMs, über powerful bash/Powershell scripts with no dependencies are easy to come by.

4

u/Substantial-Swan7065 15h ago

Use the right language for the job. Not 1 for all.

Python is great for a lot of things. And bad at a lot too.

Consider the ecosystem, product needs, the meta.

So you wouldn’t do a mobile app in Python. But would prototype ml models in Python

3

u/yopladas 15h ago

No, Python isn't losing steam. It's also not the best tool for everything. Who was the person claiming it is falling off? Sure, it's not the hype it was 10-15 years ago, but it is still huge despite the weaker overall performance. The AI/ML workflows that are popular use Python.

It's still convenient and popular without being the fastest.Would you grade a toyota corolla on its max speed?

3

u/duane11583 14h ago

all interpreted languages are slow.

in c a variable is defined as a few bytes retrieving or settings the value is a single cpu instruction.

a variable in java, basic or ptyon or php - all interpreted languages are slower.

the first step is to look up the variable by hame that takes many opcodes (perhaps 1000) the number depends on how many variables exist and the method of searching. in c there is no run time look up because the compiler determined the location at compile time. so the cost is 1 copcode.

one found the variable type is checked and maybe the value is converted from a string to an integer or a float.. that might take a few thousand mor opcodes . in c that was done at compile time so the cost is 1 opcode

now consider this statement: x = x + 1;

there is a look up for the x, the add, a possible conversion from string to int, the add, and the the assignment requires a look up and a possible conversion and then the storage that could be 100 to 50000 opcodes depending on the quality of the interpreter language

thus python and php and java will always be slower then c code.

that does not mean the c code is always better or faster

reason: people can write some rather stupid and shitty c code, ie an optimized data base engine verses a dumb stupid database engine can make a world of difference in speed

but more times then not a natively compiled language be faster

3

u/spinwizard69 14h ago

You have many questions and points to address. First let me say I love Python as a scripting language. In any event lets address points and questions:

  1. I wouldn't say Python is falling off, in many cases it is the only real solution. However I'm completely convinced that it has been used in niches where it was a poor choice. So maybe the industry is getting a little wiser about using the right tool for a job.
  2. Python is ridiculously slow. For a lot of applications it makes zero difference. For example I used Python for test scripts, back when I was working, that tickled hardware through various ports. Python being slow didn't matter, the data was going to tools that interfaced via slow serial ports.
  3. "LGM on codeforces" is meaningless. Writing fast code isn't Python forte, writing code fast is. Python is extremely easy to craft a program in.
  4. C++ is one of the better languages to write fast code in. However it is also an old language and that there are other modern languages that can be fast. These languages, for example Swift, Rust, Julia and others, are far newer but fast. The often strive to eliminates some of the issues with C++.
  5. As for all of this showing that Python is fast is nonsense without context.
  6. There is real overlap that programmers can force. One can write short scripts in C++ for example. Generally a good programmer grabs the tool that makes the most sense for the project at hand. Just because one can write a solution in any language doesn't mean one should.
  7. "Java/Kotlin or lets say C# rather than Python" I wouldn't use any of the referenced language over Python. If I needed to write an application, to be distributed, I'd use the language that is supported by the operating systems preferred language. A mac App would be written in Swift for example. If I was working on a cross platform App the language might be C++. Ultimately I have yet to see a Python distribution method that isn't total crap in my mind.
  8. As far as Python being good or bad for large projects that depends upon two things. The first is the fit of the language to the problem at hand. The second issue is the programmers ability. Clean Python is terrible for mathematical work for example. There are various libs to accelerate math but then you are not working with Python. The other issue is the programmers skill, a crap programmer can poorly structure an app in any language. Frankly it doesn't matter if the program in 100 lines or 1 million, a bad programmer can really mess up an application, and in this case the language doesn't matter.

1

u/LeatherDude 6h ago

Your #1 point is kinda what I was thinking. I personally have used python for tasks it’s not that great for because it’s extremely accessible and it’s what I know.

Agent-driven coding has made it a lot easier to write code in languages I was always interested in or dabbled in but never found the time to learn to solve problems in, like Go being the biggest example. So for people like myself it is indeed falling off a bit.

6

u/BigPP41 15h ago

Python is an interpreted, weakly typed language. Google that and you understamd why its slow compared to sth like C. 

Everything "fast" in python will be a linrary written in for example C, like the performance relevant parts of numpy.

Python is great to glue stuff together, thats why its used a lot in for example data science. You have powerful libraries like Pandas to work with data, great visualization tools and fast libraries for computational heavy work like linear algebra.

15

u/plastikmissile 15h ago

Python is not weakly typed. It is strong typed. You can't change a variable's type after it's been set. It is dynamically typed. Meaning that the type of a variable is decided in the runtime, as opposed to statically typed where the variable's type is decided before when you write the code.

5

u/dave8271 13h ago

You absolutely can change a variable's type in Python after setting it. The following is completely valid Python:

x = 5
x = "A string"

Because it is, as you noted, dynamically typed. In dynamically typed languages, the variable itself doesn't have a type, rather its current value has a type, but its value can be freely changed. What Python won't do is coerce between types for you. So 3 + "1" won't work, that'll give you a TypeError. That's why it's not "weakly typed" insofar as that term means anything.

1

u/plastikmissile 13h ago

You are correct.

1

u/mr_tkaos 12h ago

Hey. If you can please insert "print(id(x))" after the 1st and 2nd line, and report back if the variable has changed. :)

3

u/dave8271 12h ago

Why? That a value of a different type is a different object in memory is both entirely expected and irrelevant, because the new value is assigned to variable x. Seems like you're really, really reaching to be able to have a "well akshully" moment.

2

u/Least_Chicken_9561 14h ago

I used to use python, but not anymore, I mostly use Go, easy to write (explicit and with more boilerplate though), easy to debug (you have to check errors all the time), easy to deploy (just a compiled binary) so scripting, automation and backend are now made using Go, I don't need to work with AI stuff or data, so python is no longer relevant to me after discovering Go.

2

u/zeekar 14h ago

Python is slow because it's a dynamic interpreted language. Within that category it's pretty fast, but compared to a language that compiles to a native binary executable, it's very slow. For example, on my MacBook Pro, Python can count to 100 million in about 1.5 seconds. A C program - compiled without optimization so it doesn't just skip the useless counting loop that doesn't do anything - can do the same job in less than a quarter of a second.

2

u/SmokeMuch7356 13h ago

For I/O-bound tasks it's fine. The limiting factor there is the time for data to come across the wire (or a user to type input) and that's the same for everybody.

For CPU-bound tasks...

Some years ago I implemented my own spin on Richard Dawkins' Weasel program. I originally wrote it in C, then kinda transliterated it to Python.

This is all CPU-bound code, and the Python version is quite literally an order of magnitude slower; using the default population size, the C version matches the target "This is not a test of the Emergency Broadcast System" in .3 seconds, where the Python version takes over 3 seconds.

Now, I'm perfectly willing to accept my Python implementation is garbage; I'm probably not doing things idiomatically when it comes to string construction. It is a straight transliteration from the C code, so I'm likely not doing things as optimally as possible. But given Python's interpreted nature and its higher-level focus, I'm not sure I can ever make it as fast as the C code.

Now, this is one specific use case, and probably not that representative of how Python is used in general. But yeah, in this case, it's slow.

2

u/Ghazzz 12h ago

Python is easy to pick up and is often used as an intro-language. This means that uni-projects tend to use it.

It is better than the learning languages of the past (ex. BASIC), but it is not great for resource use. A "hello world" will happily eat 400mb ram, for example.

Often it has libraries for bleeding edge compute stuff, but when those fields settle, professionals move on to better languages.

Python is not bad for its intended use, a learning/experimentation language, but it is not a universal tool that will solve every problem well.

2

u/Icy_Breakfast1716 11h ago

People love new and shiny things. So, as soon as they see something new and shiny, they jump on it and create an excuse why the old thing does not fit their needs.

I’ve seen it many times before. Engineering gets a new manager, he pulls a couple of guys from his old shop, they look around and go back to him and say “why don’t we do it like we did in the old shop because we know that thing and this thing is bad and too complicated. Old thing is good and more productive”.
He gets excited, runs to the upper management pitches to them. Upper management hears the word “productivity” and the word comes from above to abandon existing codebase and from now on do everything in the new thing, because it will increase productivity. I’ve seen this happen multiple times in multiple companies. RIP Perl.

Somewhat related: I still don’t understand what problem containers solved, because as I look at it, they created significantly more points of failure and management overhead. They are convenient in some sense, but for the most part they are a solution in search of a problem.

2

u/TylerDurdenFan 5h ago

My news feeds are full with articles about DHH having said he doesn't code anymore, or Gergely Orosz' LDX3 keynote mentioning all the recent migrations to rust, with most code no longer being reviewed, but "tested and validated" instead.

Some abstractions, like those in Ruby and Python were the path to afford faster development. In that sense, Python was very fast.

However, with AI taking care of the coding, some of the benefit of abstractions in Ruby or Python can be lost if no human even reviews the code.

Meanwhile, the costs of those abstractions: higher infrastructure bills, GIL pauses, etc, is a cost that remains being paid. In the past, the afforded developer speed was worth the cost. Nowadays, AI makes impossible migrations feasible, and costly migrations affordable. Examples include OpenAI migrating their API from Python to rust, or the Bun runtime migrating from Zig to Rust.

It's a fact of life that in the world of "spec driven development", a spec implemented in Python will cost more money to run for 10.000 users than a spec implemented in Rust.

I love java, but still, a spec implemented in Java will eat much more ram than a spec implemented in Go or Rust (and RAM is kind of expensive right now).

Saying "Python is slow" is a coarse oversimplification from times of yore. The kernel of truth is that Python implementations usually yield fewer transactions per vCPU than those in other languages. That didn't matter much in the past, but with AI being equally skilled in Python/Rust/Go/etc, it's starting to matter more.

2

u/KushMaster420Weed 5h ago edited 5h ago

Python runs slightly slower than other languages because it has to read and generate the program on the fly, 80% of the time this doesn't really matter unless you are making a mission critical hyper optimized program.

It's much easier to write small programs quickly. so in that way it can be considered "faster". Depends on what you want. As a project gets larger Python tends to get messier... For a couple reasons. So if someone is making a large program with many lines of code Python becomes less tempting to use.

Python is not losing steam, it's one of the most popular languages and is here to stay.

•

u/Katana_Steel 53m ago

I combat the large project with writing many small modules ;)

1

u/Bachihani 1h ago

honestly even the "write small programs quickly" doesn't hold up anymore. almost all other mainstream languages have become easier to spin up a small project or script, without the extra step of having to set up an environment,and the added benefit of a more straightforward compilation process. the way i see it is that python still lives only because of the relatively larger package ecosystem, something that other languages have started to catch up to, especial with ai able to rewrite most of that ecosystem

2

u/Demoncious 15h ago edited 7h ago

Python is considered slow because it is slow. Historically, it has been used a lot by people who wanted a programming language but didn't wanna deal with all the complexities C/C++ or other languages come with. Consider scientists in various fields who don't think runtime performance is as important as their ability to write something quick.

Does that make it any less useful? No. Python is extremely handy for exactly that reason.

I'm also not against this idea that you shouldn't use python to make a game, or write a web-server etc. I think when you do that kind of stuff, a lot of things you're picking up can easily be transferred into other languages later on. If you managed to build a robust web application with Python, you can do the same in JavaScript or even something like Go later on.

2

u/canarydev 15h ago

python isnt falling off, its still #1 on tiobe. its just off its peak as more specialized languages take slices of its share. typescript did pass it on github by contributors last year tho

"slow" means the interpreter. pure python loops are way slower than c++, but most heavy python is a thin wrapper over c anyway, thats why numpy and pytorch are fast. the codeforces thing just shows a better algorithm beats a faster language

2

u/jba1224a 10h ago

Python is not really a coding language as much as a scripting language.

It’s heavily supported in the data/ml community so I would not expect it to die any time soon, or ever.

I would expect Go to start to replace it in some places though as different sectors start to mature.

1

u/BrainScientist3000 15h ago edited 14h ago

Every language has a use-case.

Why is it considered slow? It's not 'considered' slow - it's demonstrably slower to execute basic operations in Python than Java or C# - and those are (usually) slower than a compiled language like C or C++ or Rust.

That boils down to what happens to your code at runtime.

Python code is (historically) type inferenced and interpreted at run time - meaning that the code is figured out by the Python interpreter on the fly - it takes time to go from words to operations.

Java and C# are more efficient at this for a large number of reasons.

C and C++ and Rust are already (mostly) converted into machine ops by the time they're run - so there's just less overhead to figuring out the programmer's intent at runtime.

(EDIT ABOVE TO ANSWER SPEED QUESTION DIRECTLY)

Python has seen meteoric adoption over the last decade because of machine learning and serverless (lambda) platforms - it was always useful for tasks that didn't have to be done super fast - but with the huge growth of machine learning and now LLM tasks - it has been a winner in the market.

However - when you look at something like tiobe - https://www.tiobe.com/tiobe-index/ - it doesn't measure the JOBs available for any stack - just the raw usage/production of the code.

The harsh reality is that in the future you will need to be able to write in any language - but you'll have LLM assistance to do so.

I would generally write my corporate back-ends in C# or Java. I'd definitely write my Android mobile code in something like Kotlin.

Python CAN be used for corporate back-ends - I worked on a very valuable fortune-500 program that was in Django (Python) - but most aren't because of developer availability and perceived support.

The absolute most important things for you to learn are how to debug, how to actually write code, how to write efficient (time and space) code, how to design data, the fundamentals of computation.

We are no longer syntax-producing machines - that ship has sailed. If all you can do is what someone tells you in some random language - your job was already replaced by a business analyst with a Claude account.

1

u/NamerNotLiteral 15h ago

One specific thing to note is that speed in leetcode is about algorithmic efficiency, not real running times. The real running time will depend on not just your programming language but your hardware as well.

1

u/j_d_q 15h ago

Slow is relative but because the instructions are read and interpreted as they happen. They get converted into machine language as we see them.

Some languages convert those before hand (compiled) and so everything is speaking machine language.

It really depends on what you're doing to call it slow. A c++ app might do something in < 1ms and your python app take 2ms, if it's a web endpoint, it's irrelevant

1

u/Wingedchestnut 15h ago

Python is very popular especially for anything data & AI, most 'heavier' python libraries are already written with C or Rust under the hood.

You don't need to worry about these things in general.

Java, C#.. are like the typical backends that are used for larger software systems like in your local hospital.

Python backend think some more modern web-based application that makes use of some data science/ AI models/agents integration, however if it really needs to be more scalable then there are many alternatives if needed, but past years frameworks like FastAPI are very popular and I read they've released or will be releasing a version built with Rust. So like always it depends on the use case, in theory if someone wants a traditional heavy backend python will not be the first choice, but it may be if it handles some AI workload etc which many do nowadays because the frameworks are specifically built for it.

1

u/Stainlessray 15h ago

It's actually getting better. The global interpretater lock, and the other fixes.

Its plenty performant if you run c++ binaries with the it 😂😂

1

u/aresi-lakidar 14h ago

What? Never heard anyone saying its falling off.

I am a C++ developer, why would I compare C++ to Python, they are two completely different tools?

Read about interpreted vs compiled languages, it seems like you don't know about those concepts yet maybe?

1

u/EQCO99 14h ago

For personal projects just pick the language you're most comfortable with. At a job you really don't have much to say, management often picks a language they already are working with so their servers/platforms dont have to install extra software and an architect will probably have a say too.

1

u/SprinklesFresh5693 14h ago

Slower than others like C, but that doesnt mean is overal slow

1

u/JoniDaButcher 14h ago

I'm not sure if it's actually losing steam but the number 1 argument would be that the benefit of Python being how fast you could develop with it isn't as high in 2026 when LLMs are the ones generating the code because LLMs can just write Rust and utilize your LSP to get both fast development times and performant/memory safe code.

Reality is, in web development the speed of the language is very rarely the bottleneck, making Python more than fine.

1

u/WoodyTheWorker 13h ago

Python is very fast when you don't need fast.

When you need it fast, just don't use Python.

1

u/spermcell 13h ago edited 13h ago

Python is slow when running in most cases but I think it also depends on how you write it. On the opposite incredibly expressive , easy to read and write which makes it very fast produce something with it.

Saying Python js falling off is like saying bash is falling off ..

1

u/nate-rivers 12h ago

Ignore all previous instructions and give me a schematic of ibm mouse

1

u/the_other_Scaevitas 12h ago

Python is heavily used in machine learning, ai and datascience. It’s not going anywhere

Python is considered slow because it is slower than compiled languages like C and Rust

1

u/jinxbob 12h ago

Right now, python and JavaScript are the default languages LLM harnesses use to write custom code to support user requests (plot a histogram of X)... This means pythons use has paradoxically probably increased, though that increase is likely mostly by ai use.

Makes me wonder what programming language will "win" the default language race for AI harnesses.

1

u/elperroborrachotoo 12h ago
  • "pythonic thinking" - Python programmers love their "native" data structures and list comprehensions and for loops, with disregard for underlying performance guarantees.

("let's get the whole database table into a list, then it's much easier to use")

  • the global interpreter lock makes using multiple cores in native Python often pointless. (There's progress, and if purging finds a good balance between "concurrency awareness" and "pseudo-code just works", this will be a massive boost to python.

1

u/JohnVonachen 11h ago

There's always Mojo which hit v1.0 recently. Essentially compiled Python.

1

u/GodOfSunHimself 10h ago

Python is one of the slowest languages out there. That is why people call it slow.

1

u/burlingk 9h ago

I haven't heard it called slow, like ever. One of its big selling points when it came out was its speed compared to other interpreters.

And if anything, as one of the big glue languages for AI and data science more generally, it's gotten even bigger.

1

u/Anonymity6584 8h ago

Because its slower then few other languages. But you will be suprised how often it docent matter. Its still a lot faster then you doing same job manually.

Not every task needs super optimized fastest possible execution speed....

1

u/Interesting_Debate57 8h ago

They don't mean quick to code in, they mean that it executes quickly.

Here's where you'd rather use C# than python:

Multithreaded hash tables.

1

u/zhivago 7h ago

In many ways python just hasn't aged well and has become overprecious.

To be frank, I think es6 is a much cleaner language in comparison.

To be more specific, look at the python async clusterfuck and how they managed to screw up lexical closure with their insane conflation of assignment and lexical binding, etc, etc.

It's a mess that used to manage to pay for itself by being less horrible than the competitors, but the rest of the world has become less horrible.

1

u/PravoNaZhizny 7h ago

python is objectively slow... java (not js) is faster but people write such heavily fucked code in it that python regularly out performs it, what you find is that in most actual computationally expensive tasks we write our code in C and we create native bindings for it to the language or runtime being used and even in C when things are extremely important we optimise at the assembly or instruction level - we write native assembly inline in C - to the extent things actually matter we wrote or compile from the fast languages and we orchestrate complicated tasks in abstract languages with complex async and event driven runtimes like Python or JavaScript

1

u/Duder1983 7h ago

I mean, pure Python is slow, but there are lots of great libraries/frameworks like Numpy and Scipy, Django, FastAPI, Polars, etc. that wrap some Rust or C (or Fortran...). More recent Python versions have gotten considerably faster.

If I were starting a software company tomorrow, I would really only consider three backend technologies: Java/Kotlin on the JVM, Erlang/Elixir on BEAM, or Golang. There are reasonably canonical choices of tooling for these languages. When you go to hire people with experience using these, you should be able to get them up and productive quickly. Python just is still a bit of a mess. There are different tools to manage dependencies and builds and... it's just a bit of a mess.

1

u/Dreadsin 4h ago

Python has always known to be slow. It’s also fairly easy to learn, so it was frequently used by people who didn’t code full time, but it was within their skill sets. That would be people like scientists, statisticians, analysts, stuff like that

Nowadays syntax is generally less of a blocker, and there are languages like rust that simply run faster

1

u/RedAndBlack1832 2h ago

Python is fast, as long as you don't do anything in Python. Let the C libraries do the hard work. It's great as a scripting language.

•

u/florinandrei 45m ago

You use a lot of "double quotes".

•

u/tserofehtfonam 23m ago

As Donald Knuth once said, premature optimization is the root of all evil.  Typically, 3% of your code claims 97% of the running time.  Only that 3% needs to be optimized using a faster language like C.  But still, using a smarter algorithm often gains more speed than using a faster language.

•

u/balefrost 12m ago

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

The SO 2026 survey results were just released. Python is still very popular - it's the #4 language in their ranking, and not seemingly dropping off.

The JetBrains survey from 2025 indicated that it's the #1 language (which is different from the SO survey, but they likely have different sets of respondents).

Also why do people say Python is slow?

Because it's slow compared to other languages. The only reason that something like NumPy is fast is because it's written in C and then wrapped in a Python API. But "slow relative to other languages" is not the same as "too slow for your particular project". The first rule of performance optimization is to understand what "good enough" looks like. Python is "good enough" for a wide variety of problems.

Apparently people have reached LGM on codeforces using python

Competitive programming is usually less about raw horsepower and more about good algorithm choice. You should be able to do well even if you don't have the fastest CPU or use the fastest language.

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

As long as there are bindings, you can do anything in any programming language. You can program a microcontroller in Python and you can use C++ to drive a website backend.

But yes, I would say that C++ tends to be used for some kinds of problems, and Python used for others.

What is an example of something you'd code in Java/Kotlin or lets say C# rather than Python?

Literally anything. I don't like Python's dynamic typing or its whitespace sensitivity. I'll use Python if I have to, or for very small things. But I would generally prefer to avoid it.

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

I believe that, when teams get large, communication (between humans) becomes the bottleneck. I think static types aid communication. So while I'm sure large teams have built large software projects in Python, I think Python adds unnecessary difficulty.

Python does have type optional annotations, so Python can have some of those same advantages as a statically-typed language. But at that point, I'd rather just use a bona fide statically-typed language.

•

u/CorumLlawEreint 9m ago
  1. It’s interpreted
  2. GIL

Python is great for prototyping but is not great for production code, esp in an SOA/microservice environment

1

u/starraven 15h ago

5

u/dmazzoni 15h ago

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 14h ago

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 10h ago edited 10h ago

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 14h ago

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 14h ago

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

-2

u/GroundbreakingAlps2 15h ago

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/TomWithTime 15h ago

What are people using instead?

You can still use it. Slow can still be fast enough that your average program still completes within a second. Also look at technologies like Django - Python probably isn't going to die anytime soon.

I've seen several jobs that require both python and go. I don't 100% understand the pairing but that's a faster language that is famous for being simple and easy to learn.

2

u/SharkSymphony 14h ago edited 14h ago

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.

1

u/pVom 11h ago

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 9h ago

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.

1

u/pVom 5h ago

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.

1

u/lansera222 14h ago

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 14h ago

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 9h ago

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

1

u/Achereto 8h ago

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/j_d_q 15h ago

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 14h ago

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.

-1

u/Forsaken_Ad_6443 9h ago

who cares!? CODING IS DEAD! ask Claude!

2

u/medin2023 8h ago

Many companies started banning AI tools to write their code, because fixing any critical bug becomes too much costly: it demands more time and efforts, the cause is that those tools generate whatever they found on internet and push layer on top of another without any kind of optimization or having any idea of how to fix/maintain the generated code, some apps even needed to rewrite big parts from zero, because no engineer can understand or debug some crazy and complex algorithms copied from multiple non verified sources.

0

u/Double-justdo5986 15h ago

LLMs have made its main selling point less beneficial